Consolidate the header views updating into a single method

Call this updateView() in reset to ensure states are correct before animating.

bug: 341053089
Test: manually - video: https://drive.google.com/file/d/18ZSAEplL1Lk5ij3IHlwtRh1GQ6GhrXX1/view?usp=sharing
Flag: Aconfig com.android.launcher3.enable_private_space Nextfood
Change-Id: I2c825a7fd7d9a5faad8fbbb70d0f40294f715a42
This commit is contained in:
Brandon Dayauon committed 2024-06-04 10:09:40 -07:00
1 parent 38b9e1438e
commit 2c40b8366d
2 files changed
+53 -76

No files matched your search

@@ -149,7 +149,7 @@ public class PrivateProfileManagerTest {
@Test
public void quietModeFlagPresent_privateSpaceIsResetToDisabled() {
PrivateProfileManager privateProfileManager = spy(mPrivateProfileManager);
doNothing().when(privateProfileManager).resetPrivateSpaceDecorator(anyInt());
doNothing().when(privateProfileManager).addPrivateSpaceDecorator(anyInt());
doNothing().when(privateProfileManager).executeLock();
doReturn(mAllAppsRecyclerView).when(privateProfileManager).getMainRecyclerView();
when(mAllAppsStore.hasModelFlag(FLAG_PRIVATE_PROFILE_QUIET_MODE_ENABLED))
@@ -169,7 +169,7 @@ public class PrivateProfileManagerTest {
@Test
public void transitioningToUnlocked_resetCallsPostUnlock() throws Exception {
PrivateProfileManager privateProfileManager = spy(mPrivateProfileManager);
doNothing().when(privateProfileManager).resetPrivateSpaceDecorator(anyInt());
doNothing().when(privateProfileManager).addPrivateSpaceDecorator(anyInt());
doReturn(mAllAppsRecyclerView).when(privateProfileManager).getMainRecyclerView();
when(mAllAppsStore.hasModelFlag(FLAG_PRIVATE_PROFILE_QUIET_MODE_ENABLED))
.thenReturn(false);
@@ -186,7 +186,7 @@ public class PrivateProfileManagerTest {
@Test
public void transitioningToLocked_resetCallsExecuteLock() throws Exception {
PrivateProfileManager privateProfileManager = spy(mPrivateProfileManager);
doNothing().when(privateProfileManager).resetPrivateSpaceDecorator(anyInt());
doNothing().when(privateProfileManager).addPrivateSpaceDecorator(anyInt());
doNothing().when(privateProfileManager).executeLock();
doReturn(mAllAppsRecyclerView).when(privateProfileManager).getMainRecyclerView();
when(mAllAppsStore.hasModelFlag(FLAG_PRIVATE_PROFILE_QUIET_MODE_ENABLED))