From 981f6b91423555637d348372ee979a88af78dc01 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Mon, 2 May 2022 23:05:33 +0000 Subject: [PATCH] Revert "Do not ignore forceReload requests" This reverts commit 376e805767dcb7ced49b08658ce2e1e98ecbc077. Reason for revert: b/17988792 Fixes: 231052010 Change-Id: Ia6677da9031d50fcdd3fadf41cc33192b45a57d8 --- .../systemui/theme/ThemeOverlayController.java | 2 +- .../systemui/theme/ThemeOverlayControllerTest.java | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java index a50d3d607aece..7920d388c6702 100644 --- a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java +++ b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java @@ -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() && !forceReload) { + if (colorSchemeIsApplied()) { Log.d(TAG, "Skipping overlay creation. Theme was already: " + mColorScheme); return; } diff --git a/packages/SystemUI/tests/src/com/android/systemui/theme/ThemeOverlayControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/theme/ThemeOverlayControllerTest.java index c625dc7d4b508..3dfc94bcd5b61 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/theme/ThemeOverlayControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/theme/ThemeOverlayControllerTest.java @@ -729,18 +729,6 @@ 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());