Adds Blur and BlurFallback styles for All Apps.

Technically these styles can be used throughout Launcher, e.g.
Widget Picker and Folders, but this CL only applies it to All Apps.

At a high level, views wishing to apply transparency to show blur
should use these new attr values rather than colors directly.

When blur changes, e.g. starting or stopping battery saver, the
style is re-applied and revelant views are invalidated. For
Launcher, this is handled by DepthController, and for Taskbar it's
handled by a CrossWindowBlurListener.

Also updated the Private Space animation slightly to account for
the translucent decorators (specifically, we can't use the mask
view to cover them when blur is enabled).

Screenshots: https://drive.google.com/drive/folders/1tU472KHotgEBpT-Ec9VOBWPBf_YdVqv2?resourcekey=0-ebf7W8O6iDJ4UVMtRzTABg&usp=sharing
Private Space animations: https://drive.google.com/file/d/1h5pn8Xb17TPcbujr7uSAJNTq8kwNZoIp/view?usp=drive_link&resourcekey=0-TzpaJ16Gg8_QJctBx4oiIg
Private Space QS Tile animations: https://drive.google.com/file/d/1dCuqnqd5z2kSBEakGobMlEkMwFDBWRbJ/view?usp=drive_link&resourcekey=0-qRVFPb-a6OzaZQOf4x86Jw

Bug: 371343636
Test: Manual
Flag: com.android.launcher3.all_apps_blur
Change-Id: Ia9f581f50d1adc0830569656bdeb751deb710a9c
This commit is contained in:
Andy Wickham
2025-03-28 18:46:27 +00:00
parent ef95172183
commit 16a024df71
37 changed files with 330 additions and 166 deletions
@@ -25,7 +25,6 @@ import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
@@ -147,7 +146,7 @@ public class PrivateProfileManagerTest {
@Test
public void quietModeFlagPresent_privateSpaceIsResetToDisabled() {
PrivateProfileManager privateProfileManager = spy(mPrivateProfileManager);
doNothing().when(privateProfileManager).addPrivateSpaceDecorator(anyInt());
doNothing().when(privateProfileManager).addPrivateSpaceDecorator();
doNothing().when(privateProfileManager).executeLock();
doReturn(mAllAppsRecyclerView).when(privateProfileManager).getMainRecyclerView();
when(mAllAppsStore.hasModelFlag(FLAG_PRIVATE_PROFILE_QUIET_MODE_ENABLED))
@@ -167,7 +166,7 @@ public class PrivateProfileManagerTest {
@Test
public void transitioningToUnlocked_resetCallsPostUnlock() throws Exception {
PrivateProfileManager privateProfileManager = spy(mPrivateProfileManager);
doNothing().when(privateProfileManager).addPrivateSpaceDecorator(anyInt());
doNothing().when(privateProfileManager).addPrivateSpaceDecorator();
doReturn(mAllAppsRecyclerView).when(privateProfileManager).getMainRecyclerView();
when(mAllAppsStore.hasModelFlag(FLAG_PRIVATE_PROFILE_QUIET_MODE_ENABLED))
.thenReturn(false);
@@ -184,7 +183,7 @@ public class PrivateProfileManagerTest {
@Test
public void transitioningToLocked_resetCallsExecuteLock() throws Exception {
PrivateProfileManager privateProfileManager = spy(mPrivateProfileManager);
doNothing().when(privateProfileManager).addPrivateSpaceDecorator(anyInt());
doNothing().when(privateProfileManager).addPrivateSpaceDecorator();
doNothing().when(privateProfileManager).executeLock();
doReturn(mAllAppsRecyclerView).when(privateProfileManager).getMainRecyclerView();
when(mAllAppsStore.hasModelFlag(FLAG_PRIVATE_PROFILE_QUIET_MODE_ENABLED))