Home
last modified time | relevance | path

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

/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.java72 @Mock private UserManager mockUserManager; field in BatteryEntryTest
99 return new BatteryEntry(mMockContext, mockHandler, mockUserManager, in createBatteryEntryForApp()
114 return new BatteryEntry(mMockContext, mockHandler, mockUserManager, in createUserBatteryConsumer()
180 mockUserManager, mUidBatteryConsumer, false, 0, null, null); in getTimeInForegroundMs_app()
199 mockUserManager, mUidBatteryConsumer, false, 0, null, null); in getTimeInBackgroundMs_app()
250 doReturn(mockUserManager).when(mMockContext).getSystemService(UserManager.class); in getKey_UserBatteryConsumer_returnUserId()
259 doReturn(mockUserManager).when(mContext).getSystemService(UserManager.class); in getNameAndIconFromUserId_nullUserInfo_returnDefaultNameAndIcon()
260 doReturn(null).when(mockUserManager).getUserInfo(userId); in getNameAndIconFromUserId_nullUserInfo_returnDefaultNameAndIcon()
DBatteryDiffEntryTest.java57 @Mock private UserManager mockUserManager; field in BatteryDiffEntryTest
69 doReturn(mockUserManager).when(mContext).getSystemService(UserManager.class); in setUp()
144 doReturn(null).when(mockUserManager).getUserInfo(1001); in testLoadLabelAndIcon_forUserBattery_returnExpectedResult()
246 doReturn(mockBadgedDrawable).when(mockUserManager) in testGetAppIcon_uidConsumerWithNullIcon_returnDefaultActivityIcon()
275 doReturn(mockBadgedDrawable).when(mockUserManager) in testClearCache_switchLocale_clearCacheIconAndLabel()
277 doReturn(mockDrawable2).when(mockUserManager) in testClearCache_switchLocale_clearCacheIconAndLabel()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DContactsActor.java159 public MockUserManager mockUserManager; field in ContactsActor
331 return mockUserManager; in ContactsActor()
381 return mockUserManager; in ContactsActor()
406 if (mockUserManager != null) { in ContactsActor()
407 return mockUserManager.getUserHandle(); in ContactsActor()
425 mockUserManager = new MockUserManager(mProviderContext); in ContactsActor()
DContactsProvider2Test.java2107 mActor.mockUserManager.setUsers(MockUserManager.PRIMARY_USER, MockUserManager.CORP_USER); in setUpCorpProvider()
2125 mActor.mockUserManager.setUsers(MockUserManager.PRIMARY_USER, MockUserManager.CORP_USER); in setUpNullCorpProvider()
2847 final MockUserManager um = mActor.mockUserManager; in testQueryCorpContactsProvider()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/util/
DUserUtilsTest.java45 final MockUserManager um = mActor.mockUserManager; in testGetCorpUser()