/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | UserManagerTest.java | 93 private UserManager mUserManager = null; field in UserManagerTest 104 mUserManager = UserManager.get(mContext); in setUp() 129 UserHandle communalProfile = mUserManager.getCommunalProfile(); in removeExistingUsers() 133 List<UserInfo> list = mUserManager.getUsers(); in removeExistingUsers() 157 List<UserInfo> list = mUserManager.getUsers(); in testAddGuest() 172 UserHandle mainUser = mUserManager.getMainUser(); in testCloneUser() 200 List<UserInfo> list = mUserManager.getUsers(); in testCloneUser() 210 mUserManager.getUserProperties(UserHandle.of(cloneProfileUser.id)); in testCloneUser() 234 assertThat(mUserManager.getProfileParent(mainUserId)).isNull(); in testCloneUser() 235 UserInfo parentProfileInfo = mUserManager.getProfileParent(cloneProfileUser.id); in testCloneUser() [all …]
|
D | UserLifecycleStressTest.java | 76 private UserManager mUserManager; field in UserLifecycleStressTest 85 mUserManager = mContext.getSystemService(UserManager.class); in setup() 109 UserHandle mainUser = mUserManager.getMainUser(); in stopManagedProfileStressTest() 116 final UserInfo userInfo = mUserManager.createProfileForUser(TEST_USER_NAME, in stopManagedProfileStressTest() 128 mUserManager.removeUser(userInfo.id); in stopManagedProfileStressTest() 145 final UserInfo userInfo = mUserManager.createUser(TEST_USER_NAME, in removeRecentlyStartedUserStressTest() 176 final List<UserInfo> guestUsers = mUserManager.getGuestUsers(); in switchToExistingGuestAndStartOverStressTest() 190 .that(mUserManager.markGuestForDeletion(currentGuestId)) in switchToExistingGuestAndStartOverStressTest() 195 final UserInfo newGuest = mUserManager.createGuest(mContext); in switchToExistingGuestAndStartOverStressTest() 206 .that(mUserManager.removeUser(currentGuestId)) in switchToExistingGuestAndStartOverStressTest() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/ |
D | WifiEnterpriseRestrictionUtilsTest.java | 57 private UserManager mUserManager; field in WifiEnterpriseRestrictionUtilsTest 61 when(mContext.getSystemService(UserManager.class)).thenReturn(mUserManager); in setUp() 67 when(mUserManager.hasUserRestriction(DISALLOW_WIFI_TETHERING)).thenReturn(true); in isWifiTetheringAllowed_hasDisallowRestriction_shouldReturnFalse() 74 when(mUserManager.hasUserRestriction(DISALLOW_WIFI_TETHERING)).thenReturn(false); in isWifiTetheringAllowed_noDisallowRestriction_shouldReturnTrue() 81 when(mUserManager.hasUserRestriction(DISALLOW_WIFI_DIRECT)).thenReturn(true); in isWifiDirectAllowed_hasDisallowRestriction_shouldReturnFalse() 88 when(mUserManager.hasUserRestriction(DISALLOW_WIFI_DIRECT)).thenReturn(false); in isWifiDirectAllowed_noDisallowRestriction_shouldReturnTrue() 95 when(mUserManager.hasUserRestriction(DISALLOW_ADD_WIFI_CONFIG)).thenReturn(true); in isAddWifiConfigAllowed_hasDisallowRestriction_shouldReturnFalse() 102 when(mUserManager.hasUserRestriction(DISALLOW_ADD_WIFI_CONFIG)).thenReturn(false); in isAddWifiConfigAllowed_noDisallowRestriction_shouldReturnTrue() 109 when(mUserManager.hasUserRestriction(DISALLOW_CHANGE_WIFI_STATE)).thenReturn(true); in isChangeWifiStateAllowed_hasDisallowRestriction_shouldReturnFalse() 116 when(mUserManager.hasUserRestriction(DISALLOW_CHANGE_WIFI_STATE)).thenReturn(false); in isChangeWifiStateAllowed_noDisallowRestriction_shouldReturnTrue() [all …]
|
D | WifiRestrictionsCacheTest.java | 59 UserManager mUserManager; field in WifiRestrictionsCacheTest 72 when(mContext.getSystemService(UserManager.class)).thenReturn(mUserManager); in setUp() 75 when(mUserManager.getUserRestrictions()).thenReturn(mUserRestrictionsOwner); in setUp() 80 when(mUserManager.getUserRestrictions()).thenReturn(mUserRestrictionsGuest); in setUp() 169 when(mUserManager.getUserRestrictions()).thenReturn(userRestrictions); in mockInstance()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | TelephonyAdminReceiver.java | 35 private UserManager mUserManager; field in TelephonyAdminReceiver 40 mUserManager = null; in TelephonyAdminReceiver() 42 mDisallowCellular2gRestriction = mUserManager.hasUserRestriction( in TelephonyAdminReceiver() 61 boolean shouldDisallow2g = mUserManager.hasUserRestriction( in onReceive() 88 if (mUserManager == null) { in ensureUserManagerExists() 90 mUserManager = mContext.getSystemService(UserManager.class); in ensureUserManagerExists() 92 if (mUserManager == null) { in ensureUserManagerExists()
|
/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 | 53 private UserManager mUserManager; field in ConfirmUserCreationActivity 68 mUserManager = getSystemService(UserManager.class); in onCreate() 105 boolean cantCreateUser = mUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER) in checkUserCreationRequirements() 106 || !mUserManager.isAdminUser(); in checkUserCreationRequirements() 108 boolean cantCreateAnyMoreUsers = !mUserManager.canAddMoreUsers(USER_TYPE); in checkUserCreationRequirements() 113 | mUserManager.someUserHasSeedAccount(mAccountName, mAccountType)); in checkUserCreationRequirements() 144 UserInfo user = mUserManager.createUser(mUserName, USER_TYPE, 0); in onClick() 150 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 | 38 private ShadowUserManager mUserManager; field in DevelopmentSettingsEnablerTest 43 mUserManager = Shadow.extract(mContext.getSystemService(UserManager.class)); in setUp() 44 mUserManager.setIsAdminUser(true); in setUp() 75 mUserManager.setIsAdminUser(false); in isEnabled_settingsOn_noRestriction_notAdmin_shouldReturnFalse()
|
/frameworks/base/services/core/java/com/android/server/pm/resolution/ |
D | ComponentResolverSnapshot.java | 30 mActivities = new ComponentResolver.ActivityIntentResolver(orig.mActivities, mUserManager, in ComponentResolverSnapshot() 32 mProviders = new ComponentResolver.ProviderIntentResolver(orig.mProviders, mUserManager); in ComponentResolverSnapshot() 33 mReceivers = new ComponentResolver.ReceiverIntentResolver(orig.mReceivers, mUserManager, in ComponentResolverSnapshot() 35 mServices = new ComponentResolver.ServiceIntentResolver(orig.mServices, mUserManager); in ComponentResolverSnapshot()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/ |
D | CleanupManagerTest.java | 54 @Mock private UserManager mUserManager; field in CleanupManagerTest 60 mManager = new CleanupManager(mRecoverySnapshotStorage, mDatabase, mUserManager, in setUp() 67 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID)))) in registerRecoveryAgent_unknownUser_storesInDb() 69 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID_2)))) in registerRecoveryAgent_unknownUser_storesInDb() 83 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID)))) in registerRecoveryAgent_registersSameUser_doesntChangeDb() 101 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 | 99 UserManager mUserManager; field in BaseLockSettingsServiceTests 124 mUserManager = mock(UserManager.class); in setUp_baseServices() 147 mSettingsRule.mockContentResolver(origContext), mUserManager, mNotificationManager, in setUp_baseServices() 160 mUserManager, mPasswordSlotManager); in setUp_baseServices() 199 when(mUserManager.getUserInfo(eq(PRIMARY_USER_ID))).thenReturn(mPrimaryUserInfo); in setUp_baseServices() 205 when(mUserManager.getProfiles(eq(profile.id))).thenReturn(mPrimaryUserProfiles); in setUp_baseServices() 207 when(mUserManager.getUserInfo(eq(SECONDARY_USER_ID))).thenReturn(mSecondaryUserInfo); in setUp_baseServices() 210 when(mUserManager.getUserInfo(eq(TERTIARY_USER_ID))).thenReturn(mTertiaryUserInfo); in setUp_baseServices() 216 when(mUserManager.getUsers()).thenReturn(allUsers); in setUp_baseServices() 282 when(mUserManager.getUserInfo(eq(profileId))).thenReturn(userInfo); in installChildProfile() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ |
D | NotificationConversationInfoTest.java | 138 private UserManager mUserManager; field in NotificationConversationInfoTest 245 mUserManager, in testBindNotification_SetsShortcutIcon() 270 mUserManager, in testBindNotification_SetsTextApplicationName() 323 mUserManager, in testBindNotification_SetsTextGroupName() 349 mUserManager, in testBindNotification_GroupNameHiddenIfNoGroup() 374 mUserManager, in testBindNotification_noDelegate() 410 mUserManager, in testBindNotification_delegate() 436 mUserManager, in testBindNotification_SetsOnClickListenerForSettings() 466 mUserManager, in testBindNotification_SettingsButtonInvisibleWhenNoClickListener() 491 mUserManager, in testBindNotification_SettingsButtonInvisibleWhenDeviceUnprovisioned() [all …]
|
/frameworks/base/core/tests/coretests/src/android/app/ |
D | UiAutomationTest.java | 48 private UserManager mUserManager; field in UiAutomationTest 55 mockSystemService(UserManager.class, mUserManager); in setFixtures() 130 when(mUserManager.isVisibleBackgroundUsersSupported()).thenReturn(supported); in mockVisibleBackgroundUsersSupported() 138 when(mUserManager.getMainDisplayIdAssignedToUser()).thenReturn(displayId); in mockDisplayAssignedToUser() 142 when(mUserManager.isUserVisible()).thenReturn(visible); in mockUserVisibility()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | TaskPersisterTest.java | 48 private UserManager mUserManager; field in TaskPersisterTest 53 mUserManager = UserManager.get(context); in setUp() 88 UserInfo user = mUserManager.createUser(name, flags); in createUser() 94 boolean userRemoved = mUserManager.removeUser(userId); in removeUser()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/ |
D | WifiRestrictionsCache.java | 46 protected UserManager mUserManager; field in WifiRestrictionsCache 92 mUserManager = context.getSystemService(UserManager.class); in WifiRestrictionsCache() 93 if (mUserManager != null) { in WifiRestrictionsCache() 94 mUserRestrictions = mUserManager.getUserRestrictions(); in WifiRestrictionsCache()
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | CrossProfileResolver.java | 40 protected final UserManagerService mUserManager; field in CrossProfileResolver 45 mUserManager = userManager; in CrossProfileResolver() 94 UserInfo userInfo = mUserManager.getUserInfo(userId); in isUserEnabled() 131 return mUserManager.getProfileParent(userId); in getProfileParent()
|
D | UserNeedsBadgingCache.java | 37 private final UserManagerService mUserManager; field in UserNeedsBadgingCache 40 mUserManager = userManager; in UserNeedsBadgingCache() 60 userInfo = mUserManager.getUserInfo(userId); in get()
|
/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() 77 mOtherUser = mUserManager.createUser("TestUser", /* flags= */ 0); in setUp() 88 mUserManager.removeUser(mOtherUser.id); in tearDown()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/applications/ |
D | RecentAppOpsAccessesTest.java | 79 private UserManager mUserManager; field in RecentAppOpsAccessesTest 95 when(mContext.getSystemService(UserManager.class)).thenReturn(mUserManager); in setUp() 96 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in setUp() 115 when(mUserManager.getUserProfiles()) in setUp() 146 when(mUserManager.isQuietModeEnabled(any())).thenReturn(false); in testGetAppList_quietModeDisabled_shouldFilterRecentAccesses() 163 when(mUserManager.isQuietModeEnabled(any())).thenReturn(true); in testGetAppList_quietModeEnabledShowInQuietDefault_shouldFilterRecentAccesses() 164 when(mUserManager.getUserProperties(any())).thenReturn(mUserProperties); in testGetAppList_quietModeEnabledShowInQuietDefault_shouldFilterRecentAccesses() 183 when(mUserManager.isQuietModeEnabled(any())).thenReturn(true); in testGetAppList_quietModeEnabledShowInQuietHidden_shouldNotFilterRecentAccesses() 184 when(mUserManager.getUserProperties(any())).thenReturn(mUserProperties); in testGetAppList_quietModeEnabledShowInQuietHidden_shouldNotFilterRecentAccesses()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/ |
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()
|
D | RestrictedLockUtilsTest.java | 61 private UserManager mUserManager; field in RestrictedLockUtilsTest 81 .thenReturn(mUserManager); in setUp() 94 when(mUserManager.getUserRestrictionSources(userRestriction, in checkIfRestrictionEnforced_deviceOwner() 118 when(mUserManager.getUserRestrictionSources(userRestriction, in checkIfRestrictionEnforced_profileOwner() 197 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(userInfo, profileInfo)); in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile() 225 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(userInfo, profileInfo)); in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile() 248 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(userInfo, profileInfo)); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile() 284 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(userInfo, profileInfo)); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesParent_profileParentPolicy() 323 when(mUserManager.getUserInfo(userId)).thenReturn(userInfo); in setUpUser() 330 when(mUserManager.getUserInfo(userId)).thenReturn(userInfo); in setUpManagedProfile()
|
/frameworks/base/core/java/android/companion/virtual/audio/ |
D | UserRestrictionsDetector.java | 43 private final UserManager mUserManager; field in UserRestrictionsDetector 51 mUserManager = context.getSystemService(UserManager.class); in UserRestrictionsDetector() 56 Bundle bundle = mUserManager.getUserRestrictions(); in isUnmuteMicrophoneDisallowed()
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | CrossProfileAppsTest.java | 71 private UserManager mUserManager; field in CrossProfileAppsTest 101 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in mockContext() 121 when(mUserManager.isManagedProfile(PERSONAL_PROFILE.getIdentifier())).thenReturn(false); in initUsers() 122 when(mUserManager.isManagedProfile(MANAGED_PROFILE.getIdentifier())).thenReturn(true); in initUsers() 123 when(mUserManager.isProfile(PERSONAL_PROFILE.getIdentifier())).thenReturn(false); in initUsers() 124 when(mUserManager.isProfile(MANAGED_PROFILE.getIdentifier())).thenReturn(true); in initUsers()
|
/frameworks/base/packages/SettingsLib/Utils/src/com/android/settingslib/utils/ |
D | WorkPolicyUtils.java | 42 private final UserManager mUserManager; field in WorkPolicyUtils 52 mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); in WorkPolicyUtils() 170 List<UserHandle> allProfiles = mUserManager.getAllProfiles(); in getManagedProfileUserId() 173 if (mUserManager.isManagedProfile(id)) { in getManagedProfileUserId()
|