Merge "Do not ignore forceReload requests" into tm-dev
This commit is contained in:
@@ -474,7 +474,7 @@ public class ThemeOverlayController extends CoreStartable implements Dumpable {
|
||||
mThemeStyle = fetchThemeStyleFromSetting();
|
||||
mSecondaryOverlay = getOverlay(mMainWallpaperColor, ACCENT, mThemeStyle);
|
||||
mNeutralOverlay = getOverlay(mMainWallpaperColor, NEUTRAL, mThemeStyle);
|
||||
if (colorSchemeIsApplied()) {
|
||||
if (colorSchemeIsApplied() && !forceReload) {
|
||||
Log.d(TAG, "Skipping overlay creation. Theme was already: " + mColorScheme);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -729,6 +729,18 @@ public class ThemeOverlayControllerTest extends SysuiTestCase {
|
||||
mColorsListener.getValue().onColorsChanged(mainColors, WallpaperManager.FLAG_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.
|
||||
verify(mThemeOverlayApplier, never())
|
||||
.applyCurrentUserOverlays(any(), any(), anyInt(), any());
|
||||
|
||||
Reference in New Issue
Block a user