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

Commit bca9b0d0 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Rename Theme.SystemUI.Light

This theme was introduced before dark-theme, and signifies that lock
screen will have dark text, because the wallpaper is light.
A better name for it would be Theme.SystemUI.LightWallpaper

Bug: 183953523
Test: visual
Test: atest StatusBarTest
Change-Id: I036f935b6f9f61ed8192570911fdd958cb8f65e0
parent 4cafa299
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -335,7 +335,7 @@
        <item name="*android:isLightTheme">false</item>
    </style>

    <style name="Theme.SystemUI.Light">
    <style name="Theme.SystemUI.LightWallpaper">
        <item name="wallpaperTextColor">@*android:color/primary_text_material_light</item>
        <item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_light</item>
        <item name="wallpaperTextColorAccent">@*android:color/system_accent2_600</item>
+4 −2
Original line number Diff line number Diff line
@@ -2608,7 +2608,8 @@ public class StatusBar extends SystemUI implements DemoMode,
                " (auto: " + UiModeManager.MODE_NIGHT_AUTO +
                ", yes: " + UiModeManager.MODE_NIGHT_YES +
                ", no: " + UiModeManager.MODE_NIGHT_NO + ")");
        final boolean lightWpTheme = mContext.getThemeResId() == R.style.Theme_SystemUI_Light;
        final boolean lightWpTheme = mContext.getThemeResId()
                == R.style.Theme_SystemUI_LightWallpaper;
        pw.println("    light wallpaper theme: " + lightWpTheme);

        if (mKeyguardIndicationController != null) {
@@ -3489,7 +3490,8 @@ public class StatusBar extends SystemUI implements DemoMode,
        // Lock wallpaper defines the color of the majority of the views, hence we'll use it
        // to set our default theme.
        final boolean lockDarkText = mColorExtractor.getNeutralColors().supportsDarkText();
        final int themeResId = lockDarkText ? R.style.Theme_SystemUI_Light : R.style.Theme_SystemUI;
        final int themeResId = lockDarkText ? R.style.Theme_SystemUI_LightWallpaper
                : R.style.Theme_SystemUI;
        if (mContext.getThemeResId() != themeResId) {
            mContext.setTheme(themeResId);
            mConfigurationController.notifyThemeChanged();
+1 −1
Original line number Diff line number Diff line
@@ -322,7 +322,7 @@ public class Clock extends TextView implements
    // Update text color based when shade scrim changes color.
    public void onColorsChanged(boolean lightTheme) {
        final Context context = new ContextThemeWrapper(mContext,
                lightTheme ? R.style.Theme_SystemUI_Light : R.style.Theme_SystemUI);
                lightTheme ? R.style.Theme_SystemUI_LightWallpaper : R.style.Theme_SystemUI);
        setTextColor(Utils.getColorAttrDefaultColor(context, R.attr.wallpaperTextColor));
    }

+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ public class UserInfoControllerImpl implements UserInfoController {
        final int userId = userInfo.id;
        final boolean isGuest = userInfo.isGuest();
        final String userName = userInfo.name;
        final boolean lightIcon = mContext.getThemeResId() != R.style.Theme_SystemUI_Light;
        final boolean lightIcon = mContext.getThemeResId() != R.style.Theme_SystemUI_LightWallpaper;

        final Resources res = mContext.getResources();
        final int avatarSize = Math.max(
+1 −1
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ public class StatusBarTest extends SysuiTestCase {

        when(mCommandQueue.asBinder()).thenReturn(new Binder());

        mContext.setTheme(R.style.Theme_SystemUI_Light);
        mContext.setTheme(R.style.Theme_SystemUI_LightWallpaper);

        when(mStackScroller.getController()).thenReturn(mStackScrollerController);
        when(mStackScrollerController.getView()).thenReturn(mStackScroller);