/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | UserManagerTest.java | 87 private UserManager mUserManager = null; field in UserManagerTest 93 mUserManager = UserManager.get(mContext); in setUp() 129 List<UserInfo> list = mUserManager.getUsers(); in removeExistingUsers() 150 List<UserInfo> list = mUserManager.getUsers(); in testAddGuest() 165 final int primaryUserId = mUserManager.getPrimaryUser().id; in testCloneUser() 180 List<UserInfo> list = mUserManager.getUsers(); in testCloneUser() 188 assertThat(mUserManager.getProfileParent(primaryUserId)).isNull(); in testCloneUser() 189 UserInfo parentProfileInfo = mUserManager.getProfileParent(userInfo.id); in testCloneUser() 193 assertThat(mUserManager.getProfileParent(primaryUserId)).isNull(); in testCloneUser() 225 mUserManager.removeUser(user); in testRemoveUserByHandle() [all …]
|
D | UserLifecycleStressTest.java | 55 private UserManager mUserManager; field in UserLifecycleStressTest 61 mUserManager = mContext.getSystemService(UserManager.class); in setup() 73 final UserInfo userInfo = mUserManager.createProfileForUser("TestUser", in stopManagedProfileStressTest() 85 mUserManager.removeUser(userInfo.id); in stopManagedProfileStressTest()
|
/frameworks/opt/tv/tvsystem/java/com/android/libraries/tv/tvsystem/user/ |
D | TvUserManager.java | 36 private final UserManager mUserManager; field in TvUserManager 44 mUserManager = context.getSystemService(UserManager.class); in TvUserManager() 63 UserInfo profileInfo = mUserManager.createProfileForUser(name, in createManagedProfile() 90 int[] userIds = mUserManager.getProfileIds(mUserId, enabledOnly); in getUserProfiles() 101 return mUserManager.getUserInfo(mUserId).name; in getUserName() 106 mUserManager.setUserName(mUserId, name); in setUserName() 112 return mUserManager.getUserIcon(mUserId); in getUserIcon() 117 mUserManager.setUserIcon(mUserId, icon); in setUserIcon() 122 return mUserManager.isManagedProfile(mUserId); in isManagedProfile()
|
/frameworks/base/core/java/com/android/internal/app/ |
D | ConfirmUserCreationActivity.java | 52 private UserManager mUserManager; field in ConfirmUserCreationActivity 67 mUserManager = getSystemService(UserManager.class); in onCreate() 103 boolean cantCreateUser = mUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER) in checkUserCreationRequirements() 104 || !mUserManager.isAdminUser(); in checkUserCreationRequirements() 106 boolean cantCreateAnyMoreUsers = !mUserManager.canAddMoreUsers(); in checkUserCreationRequirements() 111 | mUserManager.someUserHasSeedAccount(mAccountName, mAccountType)); in checkUserCreationRequirements() 133 UserInfo user = mUserManager.createUser(mUserName, 0); in onClick() 139 mUserManager.setSeedAccountData(user.id, mAccountName, mAccountType, mAccountOptions); in onClick()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/ |
D | EnableAdbPreferenceControllerTest.java | 58 private UserManager mUserManager; field in EnableAdbPreferenceControllerTest 72 shadowContext.setSystemService(Context.USER_SERVICE, mUserManager); in setUp() 86 when(mUserManager.isAdminUser()).thenReturn(false); in displayPreference_isNotAdmin_shouldRemovePreference() 95 when(mUserManager.isAdminUser()).thenReturn(true); in displayPreference_isAdmin_shouldNotRemovePreference() 104 when(mUserManager.isAdminUser()).thenReturn(true); in resetPreference_shouldUncheck() 115 when(mUserManager.isAdminUser()).thenReturn(true); in handlePreferenceTreeClick_shouldUpdateSettings() 131 when(mUserManager.isAdminUser()).thenReturn(true); in handlePreferenceTreeClick_isMonkeyUser_shouldBeFalse() 141 when(mUserManager.isAdminUser()).thenReturn(true); in updateState_settingsOn_shouldCheck() 157 when(mUserManager.isAdminUser()).thenReturn(true); in updateState_settingsOff_shouldUncheck()
|
D | DevelopmentSettingsEnablerTest.java | 37 private ShadowUserManager mUserManager; field in DevelopmentSettingsEnablerTest 42 mUserManager = Shadow.extract(mContext.getSystemService(UserManager.class)); in setUp() 43 mUserManager.setIsAdminUser(true); in setUp() 74 mUserManager.setIsAdminUser(false); in isEnabled_settingsOn_noRestriction_notAdmin_shouldReturnFalse()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/ |
D | CleanupManagerTest.java | 57 @Mock private UserManager mUserManager; field in CleanupManagerTest 64 mManager = new CleanupManager(mContext, mRecoverySnapshotStorage, mDatabase, mUserManager, in setUp() 71 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID)))) in registerRecoveryAgent_unknownUser_storesInDb() 73 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID_2)))) in registerRecoveryAgent_unknownUser_storesInDb() 87 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID)))) in registerRecoveryAgent_registersSameUser_doesntChangeDb() 105 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID)))) in verifyKnownUsers_newSerialNumber_deletesData()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/ |
D | BaseLockSettingsServiceTests.java | 92 UserManager mUserManager; field in BaseLockSettingsServiceTests 115 mUserManager = mock(UserManager.class); in setUp_baseServices() 137 mContext = new MockLockSettingsContext(InstrumentationRegistry.getContext(), mUserManager, in setUp_baseServices() 151 mUserManager, mPasswordSlotManager); in setUp_baseServices() 158 when(mUserManager.getUserInfo(eq(PRIMARY_USER_ID))).thenReturn(PRIMARY_USER_INFO); in setUp_baseServices() 163 when(mUserManager.getProfiles(eq(profile.id))).thenReturn(mPrimaryUserProfiles); in setUp_baseServices() 165 when(mUserManager.getUserInfo(eq(SECONDARY_USER_ID))).thenReturn(SECONDARY_USER_INFO); in setUp_baseServices() 169 when(mUserManager.getUsers()).thenReturn(allUsers); in setUp_baseServices() 199 when(mUserManager.getUserInfo(eq(profileId))).thenReturn(userInfo); in installChildProfile() 200 when(mUserManager.getProfileParent(eq(profileId))).thenReturn(PRIMARY_USER_INFO); in installChildProfile() [all …]
|
D | MockLockSettingsContext.java | 38 private UserManager mUserManager; field in MockLockSettingsContext 54 mUserManager = userManager; in MockLockSettingsContext() 68 return mUserManager; in getSystemService()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/user/ |
D | UserCreator.java | 40 private final UserManager mUserManager; field in UserCreator 45 mUserManager = userManager; in UserCreator() 64 mUserManager.createUser(userName, UserManager.USER_TYPE_FULL_SECONDARY, 0); in createUser() 76 mUserManager.setUserIcon(user.id, UserIcons.convertToBitmap(newUserIcon)); in createUser()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | MultiUserSwitchController.java | 38 private final UserManager mUserManager; field in MultiUserSwitchController 68 mUserManager = userManager; in MultiUserSwitchController() 95 if (mUserManager.isUserSwitcherEnabled() && mUserListener == null) { in registerListener() 117 if (whitelistIpcs(() -> mUserManager.isUserSwitcherEnabled())) { in getCurrentUser() 127 return whitelistIpcs(() -> mUserManager.isUserSwitcherEnabled( in isMultiUserEnabled()
|
D | ManagedProfileControllerImpl.java | 46 private final UserManager mUserManager; field in ManagedProfileControllerImpl 57 mUserManager = UserManager.get(mContext); in ManagedProfileControllerImpl() 81 if (!mUserManager.requestQuietModeEnabled(!enableWorkMode, UserHandle.of(ui.id))) { in setWorkModeEnabled() 96 for (UserInfo ui : mUserManager.getEnabledProfiles(user)) { in reloadManagedProfiles()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
D | NotificationFilter.java | 50 private final NotificationLockscreenUserManager mUserManager; field in NotificationFilter 63 mUserManager = userManager; in NotificationFilter() 81 if (mUserManager.isLockscreenPublicMode(sbn.getUserId()) in shouldFilterOut() 83 || mUserManager.shouldHideNotifications(sbn.getUserId()) in shouldFilterOut() 84 || mUserManager.shouldHideNotifications(sbn.getKey()))) { in shouldFilterOut()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | TaskPersisterTest.java | 50 private UserManager mUserManager; field in TaskPersisterTest 55 mUserManager = UserManager.get(context); in setUp() 90 UserInfo user = mUserManager.createUser(name, flags); in createUser() 96 boolean userRemoved = mUserManager.removeUser(userId); in removeUser()
|
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/bluetooth/ |
D | BluetoothEventManagerIntegTest.java | 56 private UserManager mUserManager; field in BluetoothEventManagerIntegTest 65 mUserManager = UserManager.get(mContext); in setUp() 72 mOtherUser = mUserManager.createUser("TestUser", /* flags= */ 0); in setUp() 83 mUserManager.removeUser(mOtherUser.id); in tearDown()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/ |
D | RestrictedLockUtilsTest.java | 64 private UserManager mUserManager; field in RestrictedLockUtilsTest 82 .thenReturn(mUserManager); in setUp() 94 when(mUserManager.getUserRestrictionSources(userRestriction, in checkIfRestrictionEnforced_deviceOwner() 112 when(mUserManager.getUserRestrictionSources(userRestriction, in checkIfRestrictionEnforced_profileOwner() 186 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(userInfo, profileInfo)); in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile() 214 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(userInfo, profileInfo)); in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile() 237 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(userInfo, profileInfo)); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile() 273 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(userInfo, profileInfo)); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesParent_profileParentPolicy() 312 when(mUserManager.getUserInfo(userId)).thenReturn(userInfo); in setUpUser() 319 when(mUserManager.getUserInfo(userId)).thenReturn(userInfo); in setUpManagedProfile()
|
D | TetherUtilTest.java | 49 private UserManager mUserManager; field in TetherUtilTest 58 doReturn(mUserManager) in setUp() 133 when(mUserManager.getUserRestrictionSources( in setupIsTetherAvailable() 138 when(mUserManager.hasBaseUserRestriction( in setupIsTetherAvailable()
|
/frameworks/base/services/usb/java/com/android/server/usb/ |
D | UsbSettingsManager.java | 54 private UserManager mUserManager; field in UsbSettingsManager 62 mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); in UsbSettingsManager() 94 UserInfo parentUserInfo = mUserManager.getProfileParent(user.getIdentifier()); in getSettingsForProfileGroup() 147 List<UserInfo> users = mUserManager.getUsers(); in dump()
|
/frameworks/base/services/core/java/com/android/server/location/injector/ |
D | SystemUserInfoHelper.java | 52 @Nullable private UserManager mUserManager; field in SystemUserInfoHelper 83 if (mUserManager == null) { in getUserManager() 84 mUserManager = mContext.getSystemService(UserManager.class); in getUserManager() 88 return mUserManager; in getUserManager()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | SecurityControllerImpl.java | 91 private final UserManager mUserManager; field in SecurityControllerImpl 122 mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); in SecurityControllerImpl() 168 for (int profileId : mUserManager.getProfileIdsWithDisabled(mCurrentUserId)) { in getProfileOwnerName() 200 for (final UserInfo userInfo : mUserManager.getProfiles(userId)) { in getWorkProfileUserId() 216 return userHandle != null && !mUserManager.isQuietModeEnabled(userHandle); in isWorkProfileOn() 254 for (int profileId : mUserManager.getProfileIdsWithDisabled(mVpnUserId)) { in isVpnEnabled() 265 return mUserManager.getUserInfo(mCurrentUserId).isRestricted() in isVpnRestricted() 266 || mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_VPN, currentUser); in isVpnRestricted() 319 final UserInfo newUserInfo = mUserManager.getUserInfo(newUserId); in onUserSwitched() 420 for (UserInfo user : mUserManager.getUsers()) { in updateState()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/injector/ |
D | SystemUserInfoHelperTest.java | 54 @Mock private UserManager mUserManager; field in SystemUserInfoHelperTest 62 doReturn(mUserManager).when(mContext).getSystemService(UserManager.class); in setUp() 63 doReturn(USER1_PROFILES).when(mUserManager).getEnabledProfileIds(USER1_ID); in setUp() 64 doReturn(USER2_PROFILES).when(mUserManager).getEnabledProfileIds(USER2_ID); in setUp()
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | CrossProfileAppsTest.java | 59 private UserManager mUserManager; field in CrossProfileAppsTest 77 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in mockContext() 89 when(mUserManager.isManagedProfile(PERSONAL_PROFILE.getIdentifier())).thenReturn(false); in initUsers() 90 when(mUserManager.isManagedProfile(MANAGED_PROFILE.getIdentifier())).thenReturn(true); in initUsers()
|
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/ |
D | CleanupManager.java | 39 private final UserManager mUserManager; field in CleanupManager 74 mUserManager = userManager; in CleanupManager() 96 long currentSerialNumber = mUserManager.getSerialNumberForUser(UserHandle.of(userId)); in registerRecoveryAgent() 114 long currentSerialNumber = mUserManager.getSerialNumberForUser(UserHandle.of(userId)); in verifyKnownUsers()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ |
D | NotificationFilterTest.java | 86 NotificationLockscreenUserManager mUserManager; field in NotificationFilterTest 137 mUserManager, in setUp() 210 mUserManager, in shouldFilterOtherNotificationWhenDisabled() 227 mUserManager, in shouldFilterOtherNotificationWhenEnabled() 244 mUserManager, in shouldFilterMediaNotificationWhenDisabled() 260 mUserManager, in shouldFilterMediaNotificationWhenEnabled()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/apphibernation/ |
D | AppHibernationServiceTest.java | 101 private UserManager mUserManager; field in AppHibernationServiceTest 128 doReturn(mUserInfos).when(mUserManager).getUsers(); in setUp() 142 doReturn(true).when(mUserManager).isUserUnlockingOrUnlocked(USER_ID_1); in setUp() 176 doReturn(true).when(mUserManager).isUserUnlockingOrUnlocked(USER_ID_2); in testSetHibernatingForUser_newUserUnlocked_packageIsHibernating() 214 doReturn(true).when(mUserManager).isUserUnlockingOrUnlocked(USER_ID_2); in testGetHibernatingPackagesForUser_returnsCorrectPackages() 245 doReturn(true).when(mUserManager).isUserUnlockingOrUnlocked(USER_ID_2); in testUserLevelStatesInitializedFromDisk() 262 doReturn(true).when(mUserManager).isUserUnlockingOrUnlocked(USER_ID_2); in testNonForceStoppedAppsNotHibernatedOnUnlock() 277 doReturn(true).when(mUserManager).isUserUnlockingOrUnlocked(USER_ID_2); in testUnhibernatedPackageForUserUnhibernatesPackageGloballyOnUnlock() 458 return mUserManager; in getUserManager()
|