summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2015-05-07 21:19:57 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-07 21:19:59 +0000
commit6a8c79bb2b4b0c749e76dc3628ec5200efec4f40 (patch)
tree002d055790131d35f38e5a4d0ff68b198e6f1714 /services
parent6fc03e6523ee566ed278c3b64aa344ae95c8d824 (diff)
parente54d245b993e1347cb32c23a6bdc907a45fab324 (diff)
downloadframeworks_base-6a8c79bb2b4b0c749e76dc3628ec5200efec4f40.zip
frameworks_base-6a8c79bb2b4b0c749e76dc3628ec5200efec4f40.tar.gz
frameworks_base-6a8c79bb2b4b0c749e76dc3628ec5200efec4f40.tar.bz2
Merge "Improve keying for theme caches, rebase system theme on config change" into mnc-dev
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/policy/GlobalActions.java2
-rw-r--r--services/java/com/android/server/SystemServer.java9
2 files changed, 9 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/policy/GlobalActions.java b/services/core/java/com/android/server/policy/GlobalActions.java
index b431b33..3cee927 100644
--- a/services/core/java/com/android/server/policy/GlobalActions.java
+++ b/services/core/java/com/android/server/policy/GlobalActions.java
@@ -1138,7 +1138,7 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
public GlobalActionsDialog(Context context, AlertParams params) {
super(context, getDialogTheme(context));
- mContext = context;
+ mContext = getContext();
mAlert = new AlertController(mContext, this, getWindow());
mAdapter = (MyAdapter) params.mAdapter;
mWindowTouchSlop = ViewConfiguration.get(context).getScaledWindowTouchSlop();
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 2d265e2..925a609 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -28,6 +28,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
+import android.content.res.Resources.Theme;
import android.os.Build;
import android.os.Environment;
import android.os.FactoryTest;
@@ -291,7 +292,7 @@ public final class SystemServer {
private void createSystemContext() {
ActivityThread activityThread = ActivityThread.systemMain();
mSystemContext = activityThread.getSystemContext();
- mSystemContext.setTheme(android.R.style.Theme_DeviceDefault_Light_DarkActionBar);
+ mSystemContext.setTheme(android.R.style.Theme_Material_DayNight_DarkActionBar);
}
/**
@@ -1026,6 +1027,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());