Home
last modified time | relevance | path

Searched refs:mockUserManager (Results 1 – 8 of 8) sorted by relevance

/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/
DDisallowAddUserTaskTest.java46 @Mock private UserManager mockUserManager; field in DisallowAddUserTaskTest
66 when(mockContext.getSystemService(Context.USER_SERVICE)).thenReturn(mockUserManager); in setUp()
68 when(mockUserManager.hasUserRestriction(anyString(), any(UserHandle.class))) in setUp()
76 when(mockUserManager.getUsers()).thenReturn(Collections.singletonList(primaryUser)); in testMaybeDisallowAddUsers_normalSystem()
85 verify(mockUserManager).setUserRestriction(UserManager.DISALLOW_ADD_USER, true, in testMaybeDisallowAddUsers_normalSystem()
94 when(mockUserManager.getUsers()).thenReturn(Collections.singletonList(primaryUser)); in testMaybeDisallowAddUsers_normalSystem_restrictionAlreadySetupForOneUser()
100 when(mockUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER, in testMaybeDisallowAddUsers_normalSystem_restrictionAlreadySetupForOneUser()
108 verify(mockUserManager, never()).setUserRestriction(anyString(), anyBoolean(), in testMaybeDisallowAddUsers_normalSystem_restrictionAlreadySetupForOneUser()
116 when(mockUserManager.getUsers()).thenReturn(Arrays.asList(new UserInfo[]{ in testMaybeDisallowAddUsers_splitUserSystem_meatUserDeviceOwner()
126 verify(mockUserManager).setUserRestriction(UserManager.DISALLOW_ADD_USER, true, in testMaybeDisallowAddUsers_splitUserSystem_meatUserDeviceOwner()
[all …]
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/
DUserIdManagerTest.java50 private final UserManager mockUserManager = mock(UserManager.class); field in UserIdManagerTest
58 when(mockUserManager.isManagedProfile(managedUser1.getIdentifier())).thenReturn(true); in setUp()
59 when(mockUserManager.isManagedProfile(systemUser.getIdentifier())).thenReturn(false); in setUp()
60 when(mockUserManager.isManagedProfile(nonManagedUser1.getIdentifier())).thenReturn(false); in setUp()
61 when(mockUserManager.isManagedProfile(nonManagedUser2.getIdentifier())).thenReturn(false); in setUp()
63 when(mockContext.getSystemService(Context.USER_SERVICE)).thenReturn(mockUserManager); in setUp()
135 when(mockUserManager.getUserProfiles()).thenReturn(Arrays.asList(systemUser, managedUser1)); in testGetUserIds_deviceNotSupported()
148 when(mockUserManager.getUserProfiles()).thenReturn( in testGetUserIds_deviceWithoutPermission()
192 when(mockUserManager.getUserProfiles()).thenReturn(usersOnDevice); in initializeUserIdManager()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryEntryTest.java63 @Mock private UserManager mockUserManager; field in BatteryEntryTest
82 return new BatteryEntry(mockContext, mockHandler, mockUserManager, createSipperForApp()); in createBatteryEntryForApp()
93 return new BatteryEntry(mockContext, mockHandler, mockUserManager, createSipperForSystem()); in createBatteryEntryForSystem()
147 mockUserManager, batterySipper); in batteryEntryForAOD_containCorrectInfo()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DContactsActor.java159 public MockUserManager mockUserManager; field in ContactsActor
326 return mockUserManager; in ContactsActor()
376 return mockUserManager; in ContactsActor()
401 if (mockUserManager != null) { in ContactsActor()
402 return mockUserManager.getUserHandle(); in ContactsActor()
420 mockUserManager = new MockUserManager(mProviderContext); in ContactsActor()
DContactsProvider2Test.java2114 mActor.mockUserManager.setUsers(MockUserManager.PRIMARY_USER, MockUserManager.CORP_USER); in setUpCorpProvider()
2132 mActor.mockUserManager.setUsers(MockUserManager.PRIMARY_USER, MockUserManager.CORP_USER); in setUpNullCorpProvider()
2854 final MockUserManager um = mActor.mockUserManager; in testQueryCorpContactsProvider()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/finalization/
DFinalizationPostSuwControllerTest.java273 final UserManager mockUserManager = mock(UserManager.class); in testCorpOwnedManagedProfileDuringSuw() local
276 when(mActivity.getSystemService(Context.USER_SERVICE)).thenReturn(mockUserManager); in testCorpOwnedManagedProfileDuringSuw()
288 verify(mockUserManager).setUserRestriction(UserManager.DISALLOW_REMOVE_MANAGED_PROFILE, in testCorpOwnedManagedProfileDuringSuw()
DFinalizationInsideSuwControllerTest.java367 final UserManager mockUserManager = mock(UserManager.class); in testCorpOwnedManagedProfileDuringSuw() local
370 when(mActivity.getSystemService(Context.USER_SERVICE)).thenReturn(mockUserManager); in testCorpOwnedManagedProfileDuringSuw()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/util/
DUserUtilsTest.java45 final MockUserManager um = mActor.mockUserManager; in testGetCorpUser()