/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/ |
D | AccountPreferenceControllerTest.java | 75 private UserManager mUserManager; field in AccountPreferenceControllerTest 91 shadowApp.setSystemService(Context.USER_SERVICE, mUserManager); in setUp() 109 when(mUserManager.isManagedProfile()).thenReturn(true); in onResume_managedProfile_shouldNotAddAccountCategory() 118 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_linkedUser_shouldAddOneAccountCategory() 119 when(mUserManager.isRestrictedProfile()).thenReturn(true); in onResume_linkedUser_shouldAddOneAccountCategory() 120 when(mUserManager.getUserInfo(anyInt())).thenReturn(info); in onResume_linkedUser_shouldAddOneAccountCategory() 131 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_oneProfile_shouldAddOneAccountCategory() 132 when(mUserManager.isRestrictedProfile()).thenReturn(false); in onResume_oneProfile_shouldAddOneAccountCategory() 133 when(mUserManager.getProfiles(anyInt())).thenReturn(infos); in onResume_oneProfile_shouldAddOneAccountCategory() 145 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_twoProfiles_shouldAddTwoAccountCategory() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/android/car/userlib/ |
D | CarUserManagerHelperTest.java | 74 private UserManager mUserManager; field in CarUserManagerHelperTest 95 doReturn(mUserManager).when(mContext).getSystemService(Context.USER_SERVICE); in setUpMocksAndVariables() 107 doReturn(mCurrentProcessUser).when(mUserManager).getUserInfo(UserHandle.myUserId()); in setUpMocksAndVariables() 221 doReturn(false).when(mUserManager) in testCurrentProcessCanAddUsers() 225 doReturn(true).when(mUserManager) in testCurrentProcessCanAddUsers() 232 doReturn(false).when(mUserManager) in testCurrentProcessCanRemoveUsers() 236 doReturn(true).when(mUserManager) in testCurrentProcessCanRemoveUsers() 243 doReturn(false).when(mUserManager) in testCurrentProcessCanSwitchUsers() 247 doReturn(true).when(mUserManager) in testCurrentProcessCanSwitchUsers() 256 doReturn(true).when(mUserManager).isGuestUser(); in testCurrentGuestProcessCannotModifyAccounts() [all …]
|
/packages/services/Car/user/car-user-lib/src/android/car/userlib/ |
D | CarUserManagerHelper.java | 100 private final UserManager mUserManager; field in CarUserManagerHelper 133 mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); in CarUserManagerHelper() 280 mUserManager.setDefaultGuestRestrictions(defaultGuestRestrictions); in initDefaultGuestRestrictions() 298 return mUserManager.getUserInfo(UserHandle.USER_SYSTEM); in getSystemUserInfo() 310 return mUserManager.getUserInfo(getCurrentForegroundUserId()); in getCurrentForegroundUserInfo() 333 return mUserManager.getUserInfo(getCurrentProcessUserId()); in getCurrentProcessUserInfo() 367 return mUserManager.getUsers(/* excludeDying= */ true); in getAllUsers() 431 List<UserInfo> users = mUserManager.getUsers(/* excludeDying= */true); in getAllUsersExceptSpecifiedUser() 450 List<UserInfo> users = mUserManager.getUsers(/* excludeDying= */true); in getAllUsersExceptSystemUserAndSpecifiedUser() 590 UserInfo user = mUserManager.getUserInfo(userId); in isPersistentUser() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/users/ |
D | AutoSyncWorkDataPreferenceControllerTest.java | 48 private UserManager mUserManager; field in AutoSyncWorkDataPreferenceControllerTest 59 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in setUp() 66 when(mUserManager.isManagedProfile()).thenReturn(true); in checkIsAvailable_managedProfile_shouldNotDisplay() 73 when(mUserManager.isManagedProfile()).thenReturn(false); in checkIsAvailable_linkedUser_shouldNotDisplay() 74 when(mUserManager.isRestrictedProfile()).thenReturn(true); in checkIsAvailable_linkedUser_shouldNotDisplay() 81 when(mUserManager.isManagedProfile()).thenReturn(false); in checkIsAvailable_singleUserProfile_shouldNotDisplay() 82 when(mUserManager.isRestrictedProfile()).thenReturn(false); in checkIsAvailable_singleUserProfile_shouldNotDisplay() 86 when(mUserManager.getProfiles(eq(UserHandle.USER_SYSTEM))).thenReturn(infos); in checkIsAvailable_singleUserProfile_shouldNotDisplay() 93 when(mUserManager.isManagedProfile()).thenReturn(false); in checkIsAvailable_null_workProfileUserHandle_shouldNotDisplay() 94 when(mUserManager.isRestrictedProfile()).thenReturn(false); in checkIsAvailable_null_workProfileUserHandle_shouldNotDisplay() [all …]
|
D | AutoSyncPersonalDataPreferenceControllerTest.java | 50 private UserManager mUserManager; field in AutoSyncPersonalDataPreferenceControllerTest 63 shadowContext.setSystemService(Context.USER_SERVICE, mUserManager); in setUp() 72 when(mUserManager.isManagedProfile()).thenReturn(true); in displayPref_managedProfile_shouldNotDisplay() 81 when(mUserManager.isManagedProfile()).thenReturn(false); in displayPref_linkedUser_shouldNotDisplay() 82 when(mUserManager.isRestrictedProfile()).thenReturn(true); in displayPref_linkedUser_shouldNotDisplay() 93 when(mUserManager.isManagedProfile()).thenReturn(false); in displayPref_oneProfile_shouldNotDisplay() 94 when(mUserManager.isRestrictedProfile()).thenReturn(false); in displayPref_oneProfile_shouldNotDisplay() 95 when(mUserManager.getProfiles(anyInt())).thenReturn(infos); in displayPref_oneProfile_shouldNotDisplay() 107 when(mUserManager.isManagedProfile()).thenReturn(false); in displayPref_prefAvailable_shouldDisplay() 108 when(mUserManager.isRestrictedProfile()).thenReturn(false); in displayPref_prefAvailable_shouldDisplay() [all …]
|
D | AutoSyncDataPreferenceControllerTest.java | 52 private UserManager mUserManager; field in AutoSyncDataPreferenceControllerTest 65 shadowContext.setSystemService(Context.USER_SERVICE, mUserManager); in setUp() 77 when(mUserManager.isManagedProfile()).thenReturn(true); in displayPref_managedProfile_shouldNotDisplay() 86 when(mUserManager.isManagedProfile()).thenReturn(false); in displayPref_linkedUser_shouldDisplay() 87 when(mUserManager.isRestrictedProfile()).thenReturn(true); in displayPref_linkedUser_shouldDisplay() 98 when(mUserManager.isManagedProfile()).thenReturn(false); in displayPref_oneProfile_shouldDisplay() 99 when(mUserManager.isRestrictedProfile()).thenReturn(false); in displayPref_oneProfile_shouldDisplay() 100 when(mUserManager.getProfiles(anyInt())).thenReturn(infos); in displayPref_oneProfile_shouldDisplay() 112 when(mUserManager.isManagedProfile()).thenReturn(false); in displayPref_moreThanOneProfile_shouldNotDisplay() 113 when(mUserManager.isRestrictedProfile()).thenReturn(false); in displayPref_moreThanOneProfile_shouldNotDisplay() [all …]
|
D | AddUserWhenLockedPreferenceControllerTest.java | 52 private ShadowUserManager mUserManager; field in AddUserWhenLockedPreferenceControllerTest 59 mUserManager = ShadowUserManager.getShadow(); in setUp() 61 mUserManager.setSupportsMultipleUsers(true); in setUp() 71 mUserManager.setIsAdminUser(false); in displayPref_NotAdmin_shouldNotDisplay() 83 mUserManager.setIsAdminUser(false); in updateState_NotAdmin_shouldNotDisplayPreference() 93 mUserManager.setIsAdminUser(true); in updateState_Admin_shouldDisplayPreference() 94 mUserManager.setUserSwitcherEnabled(true); in updateState_Admin_shouldDisplayPreference() 95 mUserManager.setSupportsMultipleUsers(true); in updateState_Admin_shouldDisplayPreference()
|
D | UserCapabilitiesTest.java | 39 private ShadowUserManager mUserManager; field in UserCapabilitiesTest 44 mUserManager = ShadowUserManager.getShadow(); in setUp() 49 mUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in disallowUserSwitch_restrictionIsSet_true() 60 mUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in disallowUserSwitch_restrictionIsNotSet_false() 71 mUserManager.setUserSwitcherEnabled(false); in userSwitchEnabled_off() 81 mUserManager.setUserSwitcherEnabled(true); in userSwitchEnabled_on()
|
D | UserSettingsTest.java | 88 private UserManager mUserManager; field in UserSettingsTest 110 ReflectionHelpers.setField(mFragment, "mUserManager", mUserManager); in setUp() 116 when((Object) mActivity.getSystemService(UserManager.class)).thenReturn(mUserManager); in setUp() 120 doReturn(mUserManager).when(mContext).getSystemService(UserManager.class); in setUp() 142 when(mUserManager.getUserInfo(anyInt())).thenReturn(userInfo); in setListening_shouldSetSummaryWithUserName() 170 when(mUserManager.canSwitchUsers()).thenReturn(false); in updateUserList_cannotSwitchUser_shouldNotBeSelectableForGuest() 195 when(mUserManager.canSwitchUsers()).thenReturn(false); in updateUserList_cannotSwitchUser_shouldDisableAddUser() 196 when(mUserManager.canAddMoreUsers()).thenReturn(true); in updateUserList_cannotSwitchUser_shouldDisableAddUser() 243 doReturn(true).when(mUserManager).canSwitchUsers(); in withDisallowRemoveUser_ShouldDisableRemoveUser() 268 doReturn(true).when(mUserManager).canSwitchUsers(); in withoutDisallowRemoveUser_ShouldNotDisableRemoveUser()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/users/ |
D | UserDetailsSettings.java | 62 private UserManager mUserManager; field in UserDetailsSettings 80 mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); in onCreate() 94 mUserInfo = mUserManager.getUserInfo(userId); in onCreate() 95 mPhonePref.setChecked(!mUserManager.hasUserRestriction( in onCreate() 103 mDefaultGuestRestrictions = mUserManager.getDefaultGuestRestrictions(); in onCreate() 117 if (!mUserManager.isAdminUser()) { in onPreferenceClick() 143 mUserManager.setDefaultGuestRestrictions(mDefaultGuestRestrictions); in enableCallsAndSms() 148 List<UserInfo> users = mUserManager.getUsers(true); in enableCallsAndSms() 153 mUserManager.setUserRestriction( in enableCallsAndSms() 160 mUserManager.setUserRestriction(UserManager.DISALLOW_OUTGOING_CALLS, !enabled, in enableCallsAndSms() [all …]
|
D | UserSettings.java | 162 private UserManager mUserManager; field in UserSettings 257 mUserManager = (UserManager) activity.getSystemService(Context.USER_SERVICE); in onCreate() 334 final boolean canSwitchUsers = mUserManager.canSwitchUsers(); in onCreateOptionsMenu() 336 String nickname = mUserManager.getUserName(); in onCreateOptionsMenu() 391 UserInfo user = mUserManager.getUserInfo(UserHandle.myUserId()); in loadProfile() 405 Bitmap b = mUserManager.getUserIcon(myUserId); in finishLoadProfile() 466 UserInfo newUserInfo = mUserManager.createRestrictedProfile(mAddingUserName); in createRestrictedProfile() 474 UserInfo newUserInfo = mUserManager.createUser(mAddingUserName, 0); in createTrustedUser() 494 UserInfo info = mUserManager.getUserInfo(userId); in onManageUserClicked() 527 if (mUserManager.getUserInfo(userId).isRestricted()) { in onUserCreated() [all …]
|
/packages/apps/Settings/src/com/android/settings/users/ |
D | UserDetailsSettings.java | 62 private UserManager mUserManager; field in UserDetailsSettings 80 mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); in onCreate() 94 mUserInfo = mUserManager.getUserInfo(userId); in onCreate() 95 mPhonePref.setChecked(!mUserManager.hasUserRestriction( in onCreate() 103 mDefaultGuestRestrictions = mUserManager.getDefaultGuestRestrictions(); in onCreate() 117 if (!mUserManager.isAdminUser()) { in onPreferenceClick() 143 mUserManager.setDefaultGuestRestrictions(mDefaultGuestRestrictions); in enableCallsAndSms() 148 List<UserInfo> users = mUserManager.getUsers(true); in enableCallsAndSms() 153 mUserManager.setUserRestriction( in enableCallsAndSms() 160 mUserManager.setUserRestriction(UserManager.DISALLOW_OUTGOING_CALLS, !enabled, in enableCallsAndSms() [all …]
|
D | UserSettings.java | 162 private UserManager mUserManager; field in UserSettings 257 mUserManager = (UserManager) activity.getSystemService(Context.USER_SERVICE); in onCreate() 338 final boolean canSwitchUsers = mUserManager.canSwitchUsers(); in onCreateOptionsMenu() 340 String nickname = mUserManager.getUserName(); in onCreateOptionsMenu() 395 UserInfo user = mUserManager.getUserInfo(UserHandle.myUserId()); in loadProfile() 409 Bitmap b = mUserManager.getUserIcon(myUserId); in finishLoadProfile() 470 UserInfo newUserInfo = mUserManager.createRestrictedProfile(mAddingUserName); in createRestrictedProfile() 478 UserInfo newUserInfo = mUserManager.createUser(mAddingUserName, 0); in createTrustedUser() 498 UserInfo info = mUserManager.getUserInfo(userId); in onManageUserClicked() 531 if (mUserManager.getUserInfo(userId).isRestricted()) { in onUserCreated() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/compat/ |
D | UserManagerCompatVNMr1.java | 35 protected final UserManager mUserManager; field in UserManagerCompatVNMr1 43 mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); in UserManagerCompatVNMr1() 48 return mUserManager.isQuietModeEnabled(user); in isQuietModeEnabled() 53 return mUserManager.isUserUnlocked(user); in isUserUnlocked() 78 return mUserManager.getSerialNumberForUser(user); in getSerialNumberForUser() 88 return mUserManager.getUserForSerialNumber(serialNumber); in getUserForSerialNumber() 93 return mUserManager.isDemoUser(); in isDemoUser() 106 List<UserHandle> users = mUserManager.getUserProfiles(); in enableAndResetCache() 109 long serial = mUserManager.getSerialNumberForUser(user); in enableAndResetCache() 125 List<UserHandle> users = mUserManager.getUserProfiles(); in getUserProfiles()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/storage/ |
D | SecondaryUserControllerTest.java | 60 private UserManager mUserManager; field in SecondaryUserControllerTest 111 when(mUserManager.getPrimaryUser()).thenReturn(mPrimaryUser); in noSecondaryUserAddedIfNoneExist() 112 when(mUserManager.getUsers()).thenReturn(userInfos); in noSecondaryUserAddedIfNoneExist() 114 SecondaryUserController.getSecondaryUserControllers(mContext, mUserManager); in noSecondaryUserAddedIfNoneExist() 129 when(mUserManager.getPrimaryUser()).thenReturn(mPrimaryUser); in secondaryUserAddedIfHasDistinctId() 130 when(mUserManager.getUsers()).thenReturn(userInfos); in secondaryUserAddedIfHasDistinctId() 132 SecondaryUserController.getSecondaryUserControllers(mContext, mUserManager); in secondaryUserAddedIfHasDistinctId() 145 when(mUserManager.getPrimaryUser()).thenReturn(mPrimaryUser); in profilesOfPrimaryUserAreNotIgnored() 146 when(mUserManager.getUsers()).thenReturn(userInfos); in profilesOfPrimaryUserAreNotIgnored() 149 SecondaryUserController.getSecondaryUserControllers(mContext, mUserManager); in profilesOfPrimaryUserAreNotIgnored() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/usb/ |
D | UsbBackendTest.java | 58 private UserManager mUserManager; field in UsbBackendTest 81 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in setDataRole_allRolesSupported_shouldSetDataRole() 104 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in setDataRole_notAllRolesSupported_shouldSetDataAndPowerRole() 121 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in setPowerRole_allRolesSupported_shouldSetPowerRole() 144 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in setPowerRole_notAllRolesSupported_shouldSetDataAndPowerRole() 161 when(mUserManager.hasUserRestriction(UserManager.DISALLOW_USB_FILE_TRANSFER)) in areFunctionsSupported_fileTransferDisallowed_shouldReturnFalse() 163 when(mUserManager.hasBaseUserRestriction( in areFunctionsSupported_fileTransferDisallowed_shouldReturnFalse() 167 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in areFunctionsSupported_fileTransferDisallowed_shouldReturnFalse() 174 when(mUserManager.hasUserRestriction(UserManager.DISALLOW_USB_FILE_TRANSFER)) in areFunctionsSupported_fileTransferAllowed_shouldReturnTrue() 176 when(mUserManager.hasBaseUserRestriction( in areFunctionsSupported_fileTransferAllowed_shouldReturnTrue() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
D | BugReportInPowerPreferenceControllerTest.java | 52 private UserManager mUserManager; field in BugReportInPowerPreferenceControllerTest 66 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in setUp() 73 when(mUserManager.hasUserRestriction(anyString())).thenReturn(true); in isAvailable_hasDebugRestriction_shouldReturnFalse() 80 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in isAvailable_noDebugRestriction_shouldReturnTrue() 87 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in onDeveloperOptionsSwitchDisabled_preferenceShouldNotBeChecked() 97 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in onPreferenceChanged_settingDisabled_shouldDisableBugReportInPowerSetting() 109 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in onPreferenceChanged_settingEnabled_shouldEnableBugReportInPowerSetting() 122 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in updateState_settingsOn_preferenceShouldBeChecked() 134 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in updateState_settingsOff_preferenceShouldNotBeChecked() 146 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in onDeveloperOptionsSwitchDisabled_shouldTurnOffPreference()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/ |
D | UtilsTest.java | 38 @Mock private UserManager mUserManager; field in UtilsTest 47 when(mUserManager.getUserHandle()).thenReturn(TEST_PRIMARY_USER_ID); in setUp() 50 when(mUserManager.getUserInfo(TEST_PRIMARY_USER_ID)).thenReturn(primaryUser); in setUp() 53 when(mUserManager.getUserInfo(eq(TEST_MANAGED_PROFILE_ID))).thenReturn(managedProfile); in setUp() 62 when(mUserManager.getUserProfiles()) in testGetManagedProfile() 65 Utils.getManagedProfile(mUserManager).getIdentifier()); in testGetManagedProfile() 73 when(mUserManager.getUserProfiles()) in testGetManagedProfile_notPresent() 75 assertNull(Utils.getManagedProfile(mUserManager)); in testGetManagedProfile_notPresent()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/ |
D | LocationEnablerTest.java | 67 private UserManager mUserManager; field in LocationEnablerTest 80 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in setUp() 125 when(mUserManager.hasUserRestriction(anyString())).thenReturn(true); in isEnabled_restricted_shouldReturnFalse() 132 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in isEnabled_locationNotRestricted_shouldReturnTrue() 146 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in setLocationEnabled_notRestricted_shouldRefreshLocation() 156 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in setLocationEnabled_notRestricted_shouldBroadcastUpdateAndSetChanger() 201 when(mUserManager.getUserRestrictionSources( in setRestriction_getShareLocationEnforcedAdmin_shouldReturnEnforcedAdmin() 213 when(mUserManager.getUserProfiles()).thenReturn(userProfiles); in mockManagedProfile() 214 when(mUserManager.getUserHandle()).thenReturn(1); in mockManagedProfile() 215 when(mUserManager.getUserInfo(5)) in mockManagedProfile()
|
D | LocationForWorkPreferenceControllerTest.java | 62 private UserManager mUserManager; field in LocationForWorkPreferenceControllerTest 77 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in setUp() 96 verify(mUserManager) in handlePreferenceTreeClick_preferenceChecked_shouldSetRestrictionAndOnSummary() 108 verify(mUserManager) in handlePreferenceTreeClick_preferenceUnchecked_shouldSetRestritionAndOffSummary() 115 when(mUserManager.getUserProfiles()).thenReturn(new ArrayList<>()); in isAvailable_noManagedProfile_shouldReturnFalse() 190 when(mUserManager.getUserProfiles()).thenReturn(userProfiles); in mockManagedProfile() 191 when(mUserManager.getUserHandle()).thenReturn(1); in mockManagedProfile() 192 when(mUserManager.getUserInfo(5)) in mockManagedProfile()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | NetworkResetRestrictionCheckerTest.java | 40 private UserManager mUserManager; field in NetworkResetRestrictionCheckerTest 48 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in setUp() 55 when(context.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in testHasRestriction_notAdmin_shouldReturnTrue() 56 when(mUserManager.isAdminUser()).thenReturn(false); in testHasRestriction_notAdmin_shouldReturnTrue() 63 when(mUserManager.isAdminUser()).thenReturn(true); in testHasRestriction_hasUserRestriction_shouldReturnTrue() 72 when(mUserManager.isAdminUser()).thenReturn(true); in testHasRestriction_hasAdminRestriction_shouldReturnTrue() 81 when(mUserManager.isAdminUser()).thenReturn(true); in testHasRestriction_noRestriction_shouldReturnFalse()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/preprovisioning/ |
D | PreProvisioningControllerTest.java | 99 private UserManager mUserManager; field in PreProvisioningControllerTest 144 .thenReturn(mUserManager); in setUp() 155 when(mUserManager.getUserHandle()).thenReturn(TEST_USER_ID); in setUp() 184 verify(mUi).startProvisioning(mUserManager.getUserHandle(), mParams); in testManagedProfile() 251 verify(mUi).startProvisioning(mUserManager.getUserHandle(), mParams); in testManagedProfile_afterEncryption() 344 verify(mUi).startProvisioning(mUserManager.getUserHandle(), mParams); in testManagedProfile_skipEncryption() 378 verify(mUi).startProvisioning(mUserManager.getUserHandle(), mParams); in testNfc() 394 verify(mUi).startProvisioning(mUserManager.getUserHandle(), mParams); in testNfc_skipEncryption() 425 verify(mUi).startProvisioning(mUserManager.getUserHandle(), mParams); in testNfc_afterEncryption() 469 verify(mUi).startProvisioning(mUserManager.getUserHandle(), mParams); in testQr() [all …]
|
/packages/apps/EmergencyInfo/tests/robolectric/src/com/android/emergency/preferences/ |
D | EmergencyNamePreferenceTest.java | 54 private UserManager mUserManager; field in EmergencyNamePreferenceTest 66 when(mContext.getSystemService(UserManager.class)).thenReturn(mUserManager); in setUp() 67 when(mUserManager.getUserIcon(0)).thenReturn(mBitmap); in setUp() 84 when(mUserManager.getUserName()).thenReturn("Wesley"); in loadDataFromUserManager_setUserNameAndPhoto_preferenceSummaryAndIconIsSet() 87 assertThat(mTestEmergencyNamePreference.getSummary()).isEqualTo(mUserManager.getUserName()); in loadDataFromUserManager_setUserNameAndPhoto_preferenceSummaryAndIconIsSet() 94 when(mUserManager.getUserName()).thenReturn("Wesley"); in onBindDialogView_setUserName_textViewTitleIsSet() 99 assertThat(textView.getText().toString()).isEqualTo(mUserManager.getUserName()); in onBindDialogView_setUserName_textViewTitleIsSet() 158 setSummary(mUserManager.getUserName()); in TestEmergencyNamePreference()
|
/packages/apps/EmergencyInfo/src/com/android/emergency/preferences/ |
D | EmergencyNamePreference.java | 51 private UserManager mUserManager = getContext().getSystemService(UserManager.class); field in EmergencyNamePreference 62 setSummary(mUserManager.getUserName()); in EmergencyNamePreference() 90 setSummary(mUserManager.getUserName()); in reloadFromUserManager() 148 mUserNameView.setText(mUserManager.getUserName()); in onBindDialogView() 180 if (mUserManager.getUserName() == null in onDialogClosed() 181 || !userName.toString().equals(mUserManager.getUserName())) { in onDialogClosed() 182 mUserManager.setUserName(UserHandle.myUserId(), userName.toString()); in onDialogClosed() 194 mUserManager.setUserIcon(UserHandle.myUserId(), in onDialogClosed() 214 Bitmap bitmapUserIcon = mUserManager.getUserIcon(UserHandle.myUserId()); in getCircularUserIcon()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ |
D | ExternalSourceDetailPreferenceControllerTest.java | 45 private UserManager mUserManager; field in ExternalSourceDetailPreferenceControllerTest 58 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in setUp() 68 when(mUserManager.isManagedProfile()).thenReturn(true); in getAvailabilityStatus_managedProfile_shouldReturnDisabled() 76 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_notPotentialAppSource_shouldReturnDisabled() 85 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_isPotentialAppSource_shouldReturnAvailable() 109 when(mUserManager.isManagedProfile()).thenReturn(false); in isPotentialAppSource_nullPackageInfo_shouldNotCrash()
|