Rename add* to update* and call setQuietMode() itself

bug: 341053089
Test: manually - presubmit
Flag: Aconfig com.android.launcher3.enable_private_space Nextfood
Change-Id: I7d88f18e08f45fc731f3122c55986a12e754d56a
This commit is contained in:
Brandon Dayauon committed 2024-05-30 11:02:01 -07:00
1 parent c4c554139f
commit 16cb3efa1f
4 files changed
+19 -40

No files matched your search

@@ -130,7 +130,7 @@ public class PrivateProfileManagerTest {
public void lockPrivateProfile_requestsQuietModeAsTrue() throws Exception {
when(mAllAppsStore.hasModelFlag(FLAG_PRIVATE_PROFILE_QUIET_MODE_ENABLED)).thenReturn(false);
mPrivateProfileManager.lockPrivateProfile();
mPrivateProfileManager.setQuietMode(true /* lock */);
awaitTasksCompleted();
Mockito.verify(mUserManager).requestQuietModeEnabled(true, PRIVATE_HANDLE);
@@ -140,7 +140,7 @@ public class PrivateProfileManagerTest {
public void unlockPrivateProfile_requestsQuietModeAsFalse() throws Exception {
when(mAllAppsStore.hasModelFlag(FLAG_PRIVATE_PROFILE_QUIET_MODE_ENABLED)).thenReturn(true);
mPrivateProfileManager.unlockPrivateProfile();
mPrivateProfileManager.setQuietMode(false /* unlock */);
awaitTasksCompleted();
Mockito.verify(mUserManager).requestQuietModeEnabled(false, PRIVATE_HANDLE);
@@ -176,7 +176,7 @@ public class PrivateProfileManagerTest {
doNothing().when(privateProfileManager).expandPrivateSpace();
when(privateProfileManager.getCurrentState()).thenReturn(STATE_DISABLED);
privateProfileManager.unlockPrivateProfile();
privateProfileManager.setQuietMode(false /* unlock */);
privateProfileManager.reset();
awaitTasksCompleted();
@@ -194,7 +194,7 @@ public class PrivateProfileManagerTest {
doNothing().when(privateProfileManager).expandPrivateSpace();
when(privateProfileManager.getCurrentState()).thenReturn(STATE_ENABLED);
privateProfileManager.lockPrivateProfile();
privateProfileManager.setQuietMode(true /* lock */);
privateProfileManager.reset();
awaitTasksCompleted();