Only update All Apps scrim (panel) when blur state changes.

Previously we updated many other things, such as the buttons and RV
decorators, but the latest UX guidance is to use the same colors
when blurs are enabled or disabled, other than the panel color.

Note: When Overview blur is enabled, the activity is recreated and
this change is redundant. So this is only done if that flag is off.

Demo with home and taskbar all apps (toggling blur with adb):
https://drive.google.com/file/d/1HzveExKpAERxMVdu7JXQSYeGRwaBNR4_/view?usp=sharing&resourcekey=0-l-dGWOS6aCQjj2KStvwySA

Fix: 413229346
Flag: com.android.launcher3.all_apps_blur
Test: Manual with battery saver and `adb shell wm disable-blur 1` / 0
Change-Id: I55c9b46f0999c574c29a6ac7ae557b1e30d91d15
This commit is contained in:
Andy Wickham
2025-05-19 19:20:34 -07:00
parent 982b08ede0
commit dc681e83e7
7 changed files with 6 additions and 60 deletions
@@ -88,7 +88,6 @@ import android.os.Trace;
import android.os.UserHandle;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.ContextThemeWrapper;
import android.view.Display;
import android.view.HapticFeedbackConstants;
import android.view.KeyEvent;
@@ -471,16 +470,14 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
/** Apply the blur or blur fallback style to the current theme. */
public void updateBlurStyle() {
if (Flags.allAppsBlur()) {
int allAppsBlurStyleResId = getAllAppsBlurStyleResId();
getTheme().applyStyle(allAppsBlurStyleResId, true);
getAppsView().onThemeChanged(
new ContextThemeWrapper(getApplicationContext(), allAppsBlurStyleResId));
}
if (enableOverviewBackgroundWallpaperBlur()) {
if (isOverviewBackgroundBlurEnabled() != mOverviewBlurEnabled) {
mWallpaperThemeManager.recreateToUpdateTheme();
}
} else if (Flags.allAppsBlur()) {
// For all apps, we only need to update the scrim, which draws the panel. But if the
// activity was recreated above, this is unnecessary.
getAppsView().invalidateHeader();
}
}