Merge "Revert "Do not ignore forceReload requests"" into tm-dev

This commit is contained in:
Lucas Dupin
2022-05-04 00:06:16 +00:00
committed by Android (Google) Code Review
2 changed files with 1 additions and 13 deletions

View File

@@ -474,7 +474,7 @@ public class ThemeOverlayController extends CoreStartable implements Dumpable {
mThemeStyle = fetchThemeStyleFromSetting(); mThemeStyle = fetchThemeStyleFromSetting();
mSecondaryOverlay = getOverlay(mMainWallpaperColor, ACCENT, mThemeStyle); mSecondaryOverlay = getOverlay(mMainWallpaperColor, ACCENT, mThemeStyle);
mNeutralOverlay = getOverlay(mMainWallpaperColor, NEUTRAL, mThemeStyle); mNeutralOverlay = getOverlay(mMainWallpaperColor, NEUTRAL, mThemeStyle);
if (colorSchemeIsApplied() && !forceReload) { if (colorSchemeIsApplied()) {
Log.d(TAG, "Skipping overlay creation. Theme was already: " + mColorScheme); Log.d(TAG, "Skipping overlay creation. Theme was already: " + mColorScheme);
return; return;
} }

View File

@@ -729,18 +729,6 @@ public class ThemeOverlayControllerTest extends SysuiTestCase {
mColorsListener.getValue().onColorsChanged(mainColors, WallpaperManager.FLAG_SYSTEM, mColorsListener.getValue().onColorsChanged(mainColors, WallpaperManager.FLAG_SYSTEM,
USER_SYSTEM); USER_SYSTEM);
reset(mResources);
when(mResources.getColor(eq(android.R.color.system_accent1_500), any()))
.thenReturn(mThemeOverlayController.mColorScheme.getAccent1().get(6));
when(mResources.getColor(eq(android.R.color.system_accent2_500), any()))
.thenReturn(mThemeOverlayController.mColorScheme.getAccent2().get(6));
when(mResources.getColor(eq(android.R.color.system_accent3_500), any()))
.thenReturn(mThemeOverlayController.mColorScheme.getAccent3().get(6));
when(mResources.getColor(eq(android.R.color.system_neutral1_500), any()))
.thenReturn(mThemeOverlayController.mColorScheme.getNeutral1().get(6));
when(mResources.getColor(eq(android.R.color.system_neutral2_500), any()))
.thenReturn(mThemeOverlayController.mColorScheme.getNeutral2().get(6));
// Defers event because we already have initial colors. // Defers event because we already have initial colors.
verify(mThemeOverlayApplier, never()) verify(mThemeOverlayApplier, never())
.applyCurrentUserOverlays(any(), any(), anyInt(), any()); .applyCurrentUserOverlays(any(), any(), anyInt(), any());