summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorSravan Kumar Reddy Kallu <skallu@google.com>2022-04-22 01:07:19 +0000
committerSravan Kumar Reddy Kallu <skallu@google.com>2022-04-22 01:07:19 +0000
commitce506dcf0059e41e42b22029ece2abfc534ebc76 (patch)
tree35971556fb888c4c73d607295cb66e11c2077770 /core/java
parentedf1b37a0821b3bc1b0384386ded3cd3bad81be9 (diff)
Revert "Fix testRegisterComponentCallbacksOnWindowContext flaky"
This reverts commit edf1b37a0821b3bc1b0384386ded3cd3bad81be9. Reason for revert: ~2.49 seconds of BootTime regression b/230022846 Change-Id: Icaddb7aa21b95ad6f9f589528fe893ae8d5c9c93 Exempt-From-Owner-Approval: see go/perf-revert-first
Diffstat (limited to 'core/java')
-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) {