Home
last modified time | relevance | path

Searched refs:mUserManager (Results 1 – 25 of 70) sorted by relevance

123

/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserManagerTest.java62 private UserManager mUserManager = null; field in UserManagerTest
69 mUserManager = UserManager.get(getContext()); in setUp()
105 List<UserInfo> list = mUserManager.getUsers(); in removeExistingUsers()
127 List<UserInfo> list = mUserManager.getUsers(); in testAddUser()
135 Bundle restrictions = mUserManager.getUserRestrictions(user.getUserHandle()); in testAddUser()
174 final int primaryUserId = mUserManager.getPrimaryUser().id; in testGetProfileParent()
179 assertNull(mUserManager.getProfileParent(primaryUserId)); in testGetProfileParent()
180 UserInfo parentProfileInfo = mUserManager.getProfileParent(userInfo.id); in testGetProfileParent()
184 assertNull(mUserManager.getProfileParent(primaryUserId)); in testGetProfileParent()
190 final int primaryUserId = mUserManager.getPrimaryUser().id; in testAddManagedProfile()
[all …]
DUserLifecycleStressTest.java54 private UserManager mUserManager; field in UserLifecycleStressTest
60 mUserManager = mContext.getSystemService(UserManager.class); in setup()
72 final UserInfo userInfo = mUserManager.createProfileForUser("TestUser", in stopManagedProfileStressTest()
84 mUserManager.removeUser(userInfo.id); in stopManagedProfileStressTest()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DBaseLockSettingsServiceTests.java74 UserManager mUserManager; field in BaseLockSettingsServiceTests
87 mUserManager = mock(UserManager.class); in setUp()
92 mContext = new MockLockSettingsContext(getContext(), mUserManager, mNotificationManager, in setUp()
110 mUserManager); in setUp()
114 when(mUserManager.getUserInfo(eq(PRIMARY_USER_ID))).thenReturn(PRIMARY_USER_INFO); in setUp()
118 when(mUserManager.getUsers(anyBoolean())).thenReturn(mPrimaryUserProfiles); in setUp()
119 when(mUserManager.getProfiles(eq(PRIMARY_USER_ID))).thenReturn(mPrimaryUserProfiles); in setUp()
120 when(mUserManager.getUserInfo(eq(SECONDARY_USER_ID))).thenReturn(SECONDARY_USER_INFO); in setUp()
142 when(mUserManager.getUserInfo(eq(profileId))).thenReturn(userInfo); in installChildProfile()
143 when(mUserManager.getProfileParent(eq(profileId))).thenReturn(PRIMARY_USER_INFO); in installChildProfile()
[all …]
DMockLockSettingsContext.java30 private UserManager mUserManager; field in MockLockSettingsContext
40 mUserManager = userManager; in MockLockSettingsContext()
50 return mUserManager; in getSystemService()
/frameworks/base/core/java/com/android/internal/app/
DConfirmUserCreationActivity.java50 private UserManager mUserManager; field in ConfirmUserCreationActivity
63 mUserManager = getSystemService(UserManager.class); in onCreate()
99 boolean cantCreateUser = mUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER) in checkUserCreationRequirements()
100 || !mUserManager.isAdminUser(); in checkUserCreationRequirements()
102 boolean cantCreateAnyMoreUsers = !mUserManager.canAddMoreUsers(); in checkUserCreationRequirements()
107 | mUserManager.someUserHasSeedAccount(mAccountName, mAccountType)); in checkUserCreationRequirements()
129 UserInfo user = mUserManager.createUser(mUserName, 0); in onClick()
135 mUserManager.setSeedAccountData(user.id, mAccountName, mAccountType, mAccountOptions); in onClick()
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/drawer/
DProfileSelectDialogTest.java46 private UserManager mUserManager; field in ProfileSelectDialogTest
53 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in setUp()
56 when(mUserManager.getUserInfo(NORMAL_USER.getIdentifier())).thenReturn(userInfo); in setUp()
69 verify(mUserManager, never()).getUserInfo(NORMAL_USER.getIdentifier()); in testUpdateUserHandlesIfNeeded_Normal()
84 verify(mUserManager, times(1)).getUserInfo(NORMAL_USER.getIdentifier()); in testUpdateUserHandlesIfNeeded_Remove()
85 verify(mUserManager, times(2)).getUserInfo(REMOVED_USER.getIdentifier()); in testUpdateUserHandlesIfNeeded_Remove()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/
DEnableAdbPreferenceControllerTest.java54 private UserManager mUserManager; field in EnableAdbPreferenceControllerTest
66 shadowContext.setSystemService(Context.USER_SERVICE, mUserManager); in setUp()
77 when(mUserManager.isAdminUser()).thenReturn(false); in displayPreference_isNotAdmin_shouldRemovePreference()
88 when(mUserManager.isAdminUser()).thenReturn(true); in displayPreference_isAdmin_shouldNotRemovePreference()
98 when(mUserManager.isAdminUser()).thenReturn(true); in resetPreference_shouldUncheck()
109 when(mUserManager.isAdminUser()).thenReturn(true); in handlePreferenceTreeClick_shouldUpdateSettings()
123 when(mUserManager.isAdminUser()).thenReturn(true); in updateState_settingsOn_shouldCheck()
136 when(mUserManager.isAdminUser()).thenReturn(true); in updateState_settingsOff_shouldUncheck()
/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DTaskPersisterTest.java37 private UserManager mUserManager; field in TaskPersisterTest
42 mUserManager = UserManager.get(getContext()); in setUp()
73 UserInfo user = mUserManager.createUser(name, flags); in createUser()
81 if (!mUserManager.removeUser(userId)) { in removeUser()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DManagedProfileControllerImpl.java36 private final UserManager mUserManager; field in ManagedProfileControllerImpl
43 mUserManager = UserManager.get(mContext); in ManagedProfileControllerImpl()
65 if (!mUserManager.trySetQuietModeDisabled(ui.id, null)) { in setWorkModeEnabled()
71 mUserManager.setQuietModeEnabled(ui.id, true); in setWorkModeEnabled()
83 for (UserInfo ui : mUserManager.getEnabledProfiles(user)) { in reloadManagedProfiles()
DMultiUserSwitch.java52 final UserManager mUserManager; field in MultiUserSwitch
60 mUserManager = UserManager.get(getContext()); in MultiUserSwitch()
99 if (mUserManager.isUserSwitcherEnabled() && mUserListener == null) { in registerListener()
121 if (mUserManager.isUserSwitcherEnabled()) { in onClick()
155 if (mUserManager.isUserSwitcherEnabled() in refreshContentDescription()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DRestrictedLockUtilsTest.java55 private UserManager mUserManager; field in RestrictedLockUtilsTest
71 .thenReturn(mUserManager); in setUp()
118 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(new UserInfo[] { in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile()
147 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(new UserInfo[] { in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile()
171 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(new UserInfo[] { in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile()
208 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(new UserInfo[] { in checkIfKeyguardFeaturesAreDisabled_onlyMatchesParent_profileParentPolicy()
228 when(mUserManager.getUserInfo(userId)).thenReturn(userInfo); in setUpUser()
235 when(mUserManager.getUserInfo(userId)).thenReturn(userInfo); in setUpManagedProfile()
/frameworks/base/services/core/java/com/android/server/am/
DActivityStartInterceptor.java56 private UserManager mUserManager; field in ActivityStartInterceptor
99 mUserManager = UserManager.get(mService.mContext); in intercept()
123 if (!mUserManager.isQuietModeEnabled(UserHandle.of(mUserId))) { in interceptQuietProfileIfNeeded()
137 final UserInfo parent = mUserManager.getProfileParent(mUserId); in interceptQuietProfileIfNeeded()
159 final UserInfo parent = mUserManager.getProfileParent(mUserId); in interceptSuspendPackageIfNeed()
197 final UserInfo parent = mUserManager.getProfileParent(mUserId); in interceptWorkProfileChallengeIfNeeded()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DSecurityControllerImpl.java79 private final UserManager mUserManager; field in SecurityControllerImpl
106 mUserManager = (UserManager) in SecurityControllerImpl()
153 for (int profileId : mUserManager.getProfileIdsWithDisabled(mCurrentUserId)) { in getProfileOwnerName()
185 for (final UserInfo userInfo : mUserManager.getProfiles(userId)) { in getWorkProfileUserId()
216 for (int profileId : mUserManager.getProfileIdsWithDisabled(mVpnUserId)) { in isVpnEnabled()
227 return mUserManager.getUserInfo(mCurrentUserId).isRestricted() in isVpnRestricted()
228 || mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_VPN, currentUser); in isVpnRestricted()
281 final UserInfo newUserInfo = mUserManager.getUserInfo(newUserId); in onUserSwitched()
326 for (UserInfo user : mUserManager.getUsers()) { in updateState()
DUserSwitcherController.java96 protected final UserManager mUserManager; field in UserSwitcherController
123 mUserManager = UserManager.get(context); in UserSwitcherController()
198 List<UserInfo> infos = mUserManager.getUsers(true); in refreshUsers()
204 boolean canSwitchUsers = mUserManager.canSwitchUsers(); in refreshUsers()
224 picture = mUserManager.getUserIcon(info.id); in refreshUsers()
244 boolean systemCanCreateUsers = !mUserManager.hasBaseUserRestriction( in refreshUsers()
254 && mUserManager.canAddMoreUsers(); in refreshUsers()
351 if (mUserManager.removeUser(userId)) { in removeUserId()
360 UserInfo guest = mUserManager.createGuest( in switchTo()
385 UserInfo currUserInfo = mUserManager.getUserInfo(currUserId); in switchTo()
[all …]
DAccessPointControllerImpl.java58 private final UserManager mUserManager; field in AccessPointControllerImpl
64 mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); in AccessPointControllerImpl()
70 return !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_WIFI, in canConfigWifi()
DBluetoothControllerImpl.java49 private final UserManager mUserManager; field in BluetoothControllerImpl
71 mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); in BluetoothControllerImpl()
77 return !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_BLUETOOTH, in canConfigBluetooth()
79 && !mUserManager.hasUserRestriction(UserManager.DISALLOW_BLUETOOTH, in canConfigBluetooth()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DConfigurationMap.java20 private final UserManager mUserManager; field in ConfigurationMap
25 mUserManager = userManager; in ConfigurationMap()
32 mUserManager.getProfiles(mCurrentUserId))) { in put()
/frameworks/base/core/tests/coretests/src/com/android/internal/app/
DIntentForwarderActivityTest.java83 @Mock private UserManager mUserManager; field in IntentForwarderActivityTest
110 when(mUserManager.getProfiles(anyInt())).thenReturn(profiles); in forwardToManagedProfile_canForward_sendIntent()
143 when(mUserManager.getProfiles(anyInt())).thenReturn(profiles); in forwardToManagedProfile_cannotForward_sendIntent()
164 when(mUserManager.getProfiles(anyInt())).thenReturn(profiles); in forwardToManagedProfile_noManagedProfile_sendIntent()
186 when(mUserManager.getProfiles(anyInt())).thenReturn(profiles); in forwardToManagedProfile_canForward_chooserIntent()
228 when(mUserManager.getProfiles(anyInt())).thenReturn(profiles); in forwardToManagedProfile_canForward_selectorIntent()
288 return mUserManager; in getUserManager()
/frameworks/base/cmds/telecom/src/com/android/commands/telecom/
DTelecom.java58 private IUserManager mUserManager; field in Telecom
98 mUserManager = IUserManager.Stub in onRun()
100 if (mUserManager == null) { in onRun()
212 userHandle = UserHandle.of(mUserManager.getUserHandle(userSn)); in getPhoneAccountHandleFromArgs()
/frameworks/base/services/core/java/com/android/server/locksettings/
DLockSettingsService.java166 private final UserManager mUserManager; field in LockSettingsService
259 if (!mUserManager.getUserInfo(managedUserId).isManagedProfile()) { in tieManagedProfileLockIfNecessary()
271 final int parentId = mUserManager.getProfileParent(managedUserId).id; in tieManagedProfileLockIfNecessary()
412 mUserManager = injector.getUserManager(); in LockSettingsService()
424 final UserInfo user = mUserManager.getUserInfo(userId); in maybeShowEncryptionNotificationForUser()
434 if (isSecure && !mUserManager.isUserUnlockingOrUnlocked(userHandle)) { in maybeShowEncryptionNotificationForUser()
435 UserInfo parent = mUserManager.getProfileParent(userId); in maybeShowEncryptionNotificationForUser()
437 mUserManager.isUserUnlockingOrUnlocked(parent.getUserHandle()) && in maybeShowEncryptionNotificationForUser()
438 !mUserManager.isQuietModeEnabled(userHandle)) { in maybeShowEncryptionNotificationForUser()
516 && tiedManagedProfileReadyToUnlock(mUserManager.getUserInfo(userId))) { in ensureProfileKeystoreUnlocked()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DSecurityControllerTest.java61 private final UserManager mUserManager = mock(UserManager.class); field in SecurityControllerTest
74 mContext.addMockSystemService(Context.USER_SERVICE, mUserManager); in setUp()
81 when(mUserManager.getUserInfo(anyInt())).thenReturn(new UserInfo()); in setUp()
128 when(mUserManager.getProfiles(anyInt())).thenReturn(profiles); in testWorkAccount()
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbSettingsManager.java56 private UserManager mUserManager; field in UsbSettingsManager
60 mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); in UsbSettingsManager()
91 UserInfo parentUserInfo = mUserManager.getProfileParent(user.getIdentifier()); in getSettingsForProfileGroup()
/frameworks/base/services/print/java/com/android/server/print/
DPrintManagerService.java104 private final UserManager mUserManager; field in PrintManagerService.PrintManagerImpl
110 mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); in PrintManagerImpl()
735 if (!mUserManager.isUserUnlockingOrUnlocked(getChangingUserId())) return; in registerBroadcastReceivers()
755 if (!mUserManager.isUserUnlockingOrUnlocked(getChangingUserId())) return; in registerBroadcastReceivers()
775 if (!mUserManager.isUserUnlockingOrUnlocked(getChangingUserId())) return false; in registerBroadcastReceivers()
813 if (!mUserManager.isUserUnlockingOrUnlocked(getChangingUserId())) return; in registerBroadcastReceivers()
835 if (enforceUserUnlockingOrUnlocked && !mUserManager.isUserUnlockingOrUnlocked(userId)) { in getOrCreateUserStateLocked()
859 if (!mUserManager.isUserUnlockingOrUnlocked(userId)) return; in handleUserUnlocked()
896 UserInfo parent = mUserManager.getProfileParent(userId); in resolveCallingProfileParentLocked()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DWifiPermissionsUtil.java52 private final UserManager mUserManager; field in WifiPermissionsUtil
63 mUserManager = userManager; in WifiPermissionsUtil()
339 List<UserInfo> userProfiles = mUserManager.getProfiles(currentUser); in isCurrentProfile()
/frameworks/base/services/core/java/com/android/server/camera/
DCameraServiceProxy.java83 private UserManager mUserManager; field in CameraServiceProxy
207 mUserManager = UserManager.get(mContext); in onStart()
208 if (mUserManager == null) { in onStart()
315 int[] userProfiles = mUserManager.getEnabledProfileIds(currentUserHandle); in getEnabledUserHandles()

123