Home
last modified time | relevance | path

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

/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserManagerServiceCreateProfileTest.java56 private UserManagerService mUserManagerService; field in UserManagerServiceCreateProfileTest
69 mUserManagerService = new UserManagerService(InstrumentationRegistry.getContext()); in setup()
72 List<UserInfo> users = mUserManagerService.getUsers(/* excludeDying */ false); in setup()
92 mUserManagerService.getProfiles(UserHandle.USER_SYSTEM, /*excludeDying*/ false); in testGetProfiles()
98 users = mUserManagerService.getProfiles(secondaryUser.id, /*excludeDying*/ false); in testGetProfiles()
117 int[] users = mUserManagerService.getProfileIds(UserHandle.USER_SYSTEM, userType1, in testGetProfileIds_specifyType()
122 users = mUserManagerService.getProfileIds(secondaryUser.id, userType1, in testGetProfileIds_specifyType()
128 users = mUserManagerService.getProfileIds(profile.id, userType1, false, /* excludeHidden */ in testGetProfileIds_specifyType()
138 mUserManagerService.getFreeProfileBadgeLU(UserHandle.USER_SYSTEM, in testProfileBadge()
146 mUserManagerService.getFreeProfileBadgeLU(secondaryUser.id, in testProfileBadge()
[all …]
DUserManagerServiceUserInfoTest.java85 private UserManagerService mUserManagerService; field in UserManagerServiceUserInfoTest
99 mUserManagerService = new UserManagerService(InstrumentationRegistry.getContext()); in setup()
102 List<UserInfo> users = mUserManagerService.getUsers(/* excludeDying */ false); in setup()
117 mUserManagerService.writeUserLP(data, out); in testWriteReadUserInfo()
120 UserData read = mUserManagerService.readUserLP( in testWriteReadUserInfo()
135 mUserManagerService.putUserInfo(data.info); in testWriteReadDevicePolicyUserRestrictions()
143 mUserManagerService.writeUserLP(data, out); in testWriteReadDevicePolicyUserRestrictions()
150 systemUserData.info = mUserManagerService.getUserInfo(UserHandle.USER_SYSTEM); in testWriteReadDevicePolicyUserRestrictions()
151 mUserManagerService.writeUserLP(systemUserData, baos); in testWriteReadDevicePolicyUserRestrictions()
160 mUserManagerService.readUserLP(data.info.id, new ByteArrayInputStream(secondaryUserBytes), in testWriteReadDevicePolicyUserRestrictions()
[all …]
DUserManagerServiceIdRecyclingTest.java53 private UserManagerService mUserManagerService; field in UserManagerServiceIdRecyclingTest
66 mUserManagerService = new UserManagerService(InstrumentationRegistry.getContext()); in setup()
73 int userId = mUserManagerService.getNextAvailableId(); in testUserCreateRecycleIdsAddAllThenRemove()
75 mUserManagerService.putUserInfo(newUserInfo(userId)); in testUserCreateRecycleIdsAddAllThenRemove()
92 int nextId = mUserManagerService.getNextAvailableId(); in testUserCreateRecycleIdsAddAllThenRemove()
101 int userId = mUserManagerService.getNextAvailableId(); in testUserCreateRecycleIdsOverflow()
107 mUserManagerService.putUserInfo(newUserInfo(userId)); in testUserCreateRecycleIdsOverflow()
113 mUserManagerService.removeUserInfo(userId); in removeUser()
114 mUserManagerService.addRemovingUserId(userId); in removeUser()
119 mUserManagerService.getNextAvailableId(); in assertNoNextIdAvailable()
DUserManagerServiceTest.java59 private UserManagerService mUserManagerService; field in UserManagerServiceTest
72 mUserManagerService = new UserManagerService(InstrumentationRegistry.getContext()); in setup()
74 mUserManagerService.putUserInfo( in setup()
171 mUserManagerService.setUserRestriction(DISALLOW_USER_SWITCH, true, userId); in assertHasUserRestriction()
172 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, userId)).isTrue(); in assertHasUserRestriction()
174 mUserManagerService.setUserRestriction(DISALLOW_USER_SWITCH, false, userId); in assertHasUserRestriction()
175 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, userId)).isFalse(); in assertHasUserRestriction()
181 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, nonExistentUserId)) in testHasUserRestriction_NonExistentUserReturnsFalse()
188 assertThat(mUserManagerService.isUserInitialized(nonExistentUserId)) in testIsUserInitialized_NonExistentUserReturnsFalse()
195 while (mUserManagerService.userExists(incorrectId)) { in testSetUserRestrictionWithIncorrectID()
[all …]
DUserManagerServiceShellCommandTest.java66 private UserManagerService mUserManagerService; field in UserManagerServiceShellCommandTest
91 mUserManagerService = spy(serviceInstance); in setUp()
95 new UserSystemPackageInstaller(mUserManagerService, userTypes); in setUp()
96 UserManagerServiceShellCommand cmd = new UserManagerServiceShellCommand(mUserManagerService, in setUp()
103 when(mUserManagerService.getMainUserId()).thenReturn(12); in testMainUser()
115 when(mUserManagerService.getMainUserId()).thenReturn(UserHandle.USER_NULL); in testMainUserNull()
126 doReturn(true).when(mUserManagerService).canSwitchToHeadlessSystemUser(); in testCanSwitchToHeadlessSystemUser()
140 doReturn(false).when(mUserManagerService).isMainUserPermanentAdmin(); in testIsMainUserPermanentAdmin()
/frameworks/base/services/core/java/com/android/server/pm/
DCrossProfileIntentFilterHelper.java31 private final UserManagerService mUserManagerService; field in CrossProfileIntentFilterHelper
38 mUserManagerService = userManagerService; in CrossProfileIntentFilterHelper()
94 && mUserManagerService.isCrossProfileIntentFilterAccessible(sourceUserId, in clearCrossProfileIntentFilters()