diff options
author | Bryan Owens <djbryan3540@gmail.com> | 2016-05-07 20:51:27 -0500 |
---|---|---|
committer | d34d <clark@cyngn.com> | 2016-06-14 14:37:17 -0700 |
commit | 5f8d3f813d6d580b060a783c8271b6cec3794d30 (patch) | |
tree | a3913a7b0678388006fbaa743ee80566d53daf53 | |
parent | 91642748f97f26b1194f562a2219749397832b5d (diff) | |
download | frameworks_base-5f8d3f813d6d580b060a783c8271b6cec3794d30.zip frameworks_base-5f8d3f813d6d580b060a783c8271b6cec3794d30.tar.gz frameworks_base-5f8d3f813d6d580b060a783c8271b6cec3794d30.tar.bz2 |
Themes: Expose Power Dialogs
This will give themes the ability to invert the three power dialogs
without editing a main resource
Change-Id: Ibeab94add8ce8c18955576dc49c441883feb18d6
Signed-off-by: Bryan Owens <djbryan3540@gmail.com>
5 files changed, 10 insertions, 3 deletions
diff --git a/core/res/res/values/cm_styles.xml b/core/res/res/values/cm_styles.xml index df67e14..1d0de05 100644 --- a/core/res/res/values/cm_styles.xml +++ b/core/res/res/values/cm_styles.xml @@ -26,4 +26,8 @@ <style name="Theme.Material.Light.Dialog.SyncActivityTooManyDeletes" /> <style name="Theme.Material.Light.Dialog.Alert.NetInitiatedActivity" /> + <!-- Exposed style for power menu --> + + <style name="Theme.Power.Dialog" parent="@style/Theme.DeviceDefault.Light.DarkActionBar" /> + </resources> diff --git a/core/res/res/values/cm_symbols.xml b/core/res/res/values/cm_symbols.xml index 8a71499..81f33cb 100644 --- a/core/res/res/values/cm_symbols.xml +++ b/core/res/res/values/cm_symbols.xml @@ -142,4 +142,7 @@ <!-- Usb drive persistent notification --> <java-symbol type="bool" name="config_persistUsbDriveNotification" /> + + <!--Exposed style for power menu --> + <java-symbol type="style" name="Theme.Power.Dialog" /> </resources> diff --git a/services/core/java/com/android/server/policy/GlobalActions.java b/services/core/java/com/android/server/policy/GlobalActions.java index c8a6135..34fc905 100644 --- a/services/core/java/com/android/server/policy/GlobalActions.java +++ b/services/core/java/com/android/server/policy/GlobalActions.java @@ -293,7 +293,7 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac private Context getUiContext() { if (mUiContext == null) { mUiContext = ThemeUtils.createUiContext(mContext); - mUiContext.setTheme(android.R.style.Theme_DeviceDefault_Light_DarkActionBar); + mUiContext.setTheme(com.android.internal.R.style.Theme_Power_Dialog); } return mUiContext != null ? mUiContext : mContext; } diff --git a/services/core/java/com/android/server/power/ShutdownThread.java b/services/core/java/com/android/server/power/ShutdownThread.java index 5062244..36a9ca2 100644 --- a/services/core/java/com/android/server/power/ShutdownThread.java +++ b/services/core/java/com/android/server/power/ShutdownThread.java @@ -1006,7 +1006,7 @@ public final class ShutdownThread extends Thread { if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEVISION)) { uiContext.setTheme(com.android.internal.R.style.Theme_Leanback_Dialog_Alert); } else { - uiContext.setTheme(android.R.style.Theme_DeviceDefault_Light_DarkActionBar); + uiContext.setTheme(com.android.internal.R.style.Theme_Power_Dialog); } } return uiContext != null ? uiContext : context; diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index f6a0619..d69fe11 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -329,7 +329,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(com.android.internal.R.style.Theme_Power_Dialog); } /** |