Split BlurStyle and BlurFallbackStyle for All Apps and Overview.

Problem: We don't want to apply the blur style to All Apps if the
all_apps_blur flags are disabled. However, we want to still apply
the relevant colors for Overview when the Overview blur is enabled.

Solution: Split the styles into All Apps and Overview variants.
Unfortunately this creates quite a bit of extra code, but such is
the nature of flag permutations.

This is a more comprehensive color fix compared to ag/33356345,
which is reverted as part of this CL.

Note: enable_overview_background_wallpaper_blur is already broken
when disabled without this change (the live tile gets blurred),
presumably because it's already in nextfood and hasn't been tested
disabled. As such, I focused on testing All Apps blur flags both
enabled and both disabled, with the Overview flag always enabled.

Demo with All Apps flags disabled:
 - Blurs enabled (Overview should blur; All Apps unaffected):
   https://drive.google.com/file/d/1eb882JKSMF-Irc7Ls-iAClYfJIASzzXs/view?usp=drive_link&resourcekey=0-j5EafBfVHIh5oOSFzsYE4g
 - Blurs disabled (Overview should not blur; All Apps unaffected):
   https://drive.google.com/file/d/1toVHYUTj9FjpXCD7m8waeuFIwBbdy_Am/view?usp=drive_link&resourcekey=0-drqPVsELmgJVxhpgxLc-aQ

Demo with All Apps flags enabled:
 - Blurs enabled (Overview and All Apps should blur):
   https://drive.google.com/file/d/1se5yaPDYdDKcoBjZSjDSlqCiSfX0bmHv/view?usp=drive_link&resourcekey=0-U9fBJSVYY9na9r8J5xHXMw
 - Blurs disabled (Overview and All Apps should not blur):
   https://drive.google.com/file/d/1YmqlCdSJDZXGSgpeO5hk16V8Y-6tVpeW/view?usp=drive_link&resourcekey=0-rK4Zy7D8fFyPMA_1XXxwCQ
   (Note: All Apps fallback colors will change with ag/33405653)

Test: Above videos
Fix: 416248709
Flag: com.android.launcher3.all_apps_blur
Flag: com.android.launcher3.all_apps_sheet_for_handheld
Flag: com.android.launcher3.enable_overview_background_wallpaper_blur
Change-Id: I9b5cf6b0dce4014053b27ea95a91d047262427b2
This commit is contained in:
Andy Wickham
2025-05-07 22:18:34 +00:00
parent d03c7e64e2
commit 359280ef2c
7 changed files with 38 additions and 33 deletions
@@ -470,14 +470,11 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
@Override
public void updateBlurStyle() {
if (!Flags.allAppsBlur() && !enableOverviewBackgroundWallpaperBlur()) {
return;
}
if (Flags.allAppsBlur()) {
int blurStyleResId = getAllAppsBlurStyleResId();
getTheme().applyStyle(blurStyleResId, true);
int allAppsBlurStyleResId = getAllAppsBlurStyleResId();
getTheme().applyStyle(allAppsBlurStyleResId, true);
getAppsView().onThemeChanged(
new ContextThemeWrapper(getApplicationContext(), blurStyleResId));
new ContextThemeWrapper(getApplicationContext(), allAppsBlurStyleResId));
}
if (enableOverviewBackgroundWallpaperBlur()) {
getTheme().applyStyle(getOverviewBlurStyleResId(), true);