From 3d2337eeb5c8b28bace281d049c5ca8cd13c8b70 Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Tue, 11 Aug 2015 17:27:04 -0400 Subject: Cherry-pick system theme rebase to fix square UI on round watches Our system themes were based on configurations that were added post- init of the system theme. I96e695441543379e4d5fdf3cc6f18d9e6cf953b4 broke this, because there was a race condition in the code for rebasing themes If8fecde76d62738a8e55eddf898eafc468afdba2 (the cherry-picked commit) fixes the race condition and adds the rebasing back in. This change cherry picks If8fecde76d62738a8e55eddf898eafc468afdba2. Bug:23387146 Change-Id: I0725028e48599fc6cd9731ae16c71474dd5827e5 --- services/java/com/android/server/SystemServer.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'services/java') diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 7dd16d1..3effe63 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -1047,6 +1047,12 @@ public final class SystemServer { w.getDefaultDisplay().getMetrics(metrics); context.getResources().updateConfiguration(config, metrics); + // The system context's theme may be configuration-dependent. + final Theme systemTheme = context.getTheme(); + if (systemTheme.getChangingConfigurations() != 0) { + systemTheme.rebase(); + } + try { // TODO: use boot phase mPowerManagerService.systemReady(mActivityManagerService.getAppOpsService()); -- cgit v1.1 From bc58f59da6226c6f1d240c95d566186f679fc310 Mon Sep 17 00:00:00 2001 From: Bryce Lee Date: Fri, 25 Sep 2015 16:43:01 -0700 Subject: Add ThermalObserver system service to capture thermal state uevents. Bug: 21445745 Change-Id: I980d60b66ca51942a1fd62502d6cf1f09208fc3a --- services/java/com/android/server/SystemServer.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'services/java') diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 3effe63..08816b9 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -825,6 +825,11 @@ public final class SystemServer { if (!disableNonCoreServices) { mSystemServiceManager.startService(DockObserver.class); + + if (context.getPackageManager().hasSystemFeature + (PackageManager.FEATURE_WATCH)) { + mSystemServiceManager.startService(ThermalObserver.class); + } } try { -- cgit v1.1