summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/window/WindowProviderService.java5
-rw-r--r--core/java/android/window/WindowTokenClient.java8
2 files changed, 6 insertions, 7 deletions
diff --git a/core/java/android/window/WindowProviderService.java b/core/java/android/window/WindowProviderService.java
index 2d2c8de72646..f8484d15344e 100644
--- a/core/java/android/window/WindowProviderService.java
+++ b/core/java/android/window/WindowProviderService.java
@@ -165,11 +165,10 @@ public abstract class WindowProviderService extends Service implements WindowPro
}
}
- // Suppress the lint because ths is overridden from Context.
@SuppressLint("OnNameExpected")
@Override
- @Nullable
- public Object getSystemService(@NonNull String name) {
+ // Suppress the lint because ths is overridden from Context.
+ public @Nullable Object getSystemService(@NonNull String name) {
if (WINDOW_SERVICE.equals(name)) {
return mWindowManager;
}
diff --git a/core/java/android/window/WindowTokenClient.java b/core/java/android/window/WindowTokenClient.java
index b0be0df80b29..547535d90e5a 100644
--- a/core/java/android/window/WindowTokenClient.java
+++ b/core/java/android/window/WindowTokenClient.java
@@ -91,6 +91,7 @@ public class WindowTokenClient extends IWindowToken.Stub {
throw new IllegalStateException("Context is already attached.");
}
mContextRef = new WeakReference<>(context);
+ mConfiguration.setTo(context.getResources().getConfiguration());
mShouldDumpConfigForIme = Build.IS_DEBUGGABLE
&& context instanceof AbstractInputMethodService;
}
@@ -111,8 +112,7 @@ public class WindowTokenClient extends IWindowToken.Stub {
if (configuration == null) {
return false;
}
- mHandler.runWithScissors(() -> onConfigurationChanged(configuration, displayId,
- false /* shouldReportConfigChange */), 0 /* timeout */);
+ onConfigurationChanged(configuration, displayId, false /* shouldReportConfigChange */);
mAttachToWindowContainer = true;
return true;
} catch (RemoteException e) {
@@ -137,8 +137,8 @@ public class WindowTokenClient extends IWindowToken.Stub {
if (configuration == null) {
return false;
}
- mHandler.runWithScissors(() -> onConfigurationChanged(configuration, displayId,
- false /* shouldReportConfigChange */), 0 /* timeout */);
+ mHandler.post(() -> onConfigurationChanged(configuration, displayId,
+ false /* shouldReportConfigChange */));
mAttachToWindowContainer = true;
return true;
} catch (RemoteException e) {