Merge "Rename Theme.SystemUI.Light" into sc-dev

This commit is contained in:
Lucas Dupin
2021-04-02 22:26:24 +00:00
committed by Android (Google) Code Review
5 changed files with 8 additions and 6 deletions

View File

@@ -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>

View File

@@ -2613,7 +2613,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) {
@@ -3494,7 +3495,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();

View File

@@ -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));
}

View File

@@ -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(

View File

@@ -298,7 +298,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);