Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f8d3f81 authored by Bryan Owens's avatar Bryan Owens Committed by d34d
Browse files

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: default avatarBryan Owens <djbryan3540@gmail.com>
parent 91642748
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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>
+3 −0
Original line number Diff line number Diff line
@@ -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>
+1 −1
Original line number Diff line number Diff line
@@ -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;
    }
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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);
    }

    /**