/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/util/ |
D | UserUtilsTest.java | 45 final MockUserManager um = mActor.mockUserManager; in testGetCorpUser() local 51 um.setUsers(MockUserManager.PRIMARY_USER, MockUserManager.CORP_USER); in testGetCorpUser() 53 um.myUser = MockUserManager.PRIMARY_USER.id; in testGetCorpUser() 56 um.myUser = MockUserManager.CORP_USER.id; in testGetCorpUser() 60 um.setUsers(MockUserManager.PRIMARY_USER, MockUserManager.SECONDARY_USER, in testGetCorpUser() 63 um.myUser = MockUserManager.PRIMARY_USER.id; in testGetCorpUser() 66 um.myUser = MockUserManager.CORP_USER.id; in testGetCorpUser() 69 um.myUser = MockUserManager.SECONDARY_USER.id; in testGetCorpUser() 73 um.setUsers(MockUserManager.PRIMARY_USER, MockUserManager.SECONDARY_USER); in testGetCorpUser() 75 um.myUser = MockUserManager.PRIMARY_USER.id; in testGetCorpUser() [all …]
|
/packages/apps/Settings/src/com/android/settings/ |
D | Utils.java | 194 UserManager um = UserManager.get(context); in getUserManager() local 195 if (um == null) { in getUserManager() 198 return um; in getUserManager() 432 public static int getManagedProfileId(UserManager um, int parentUserId) { in getManagedProfileId() argument 433 int[] profileIds = um.getProfileIdsWithDisabled(parentUserId); in getManagedProfileId() 458 UserManager um, @Nullable Bundle arguments, @Nullable Bundle intentExtras) { in getSecureTargetUser() argument 469 if (isProfileOf(um, launchedFromUser)) { in getSecureTargetUser() 476 if (launchedFromSettingsApp && isProfileOf(um, extrasUser)) { in getSecureTargetUser() 483 if (launchedFromSettingsApp && isProfileOf(um, argumentsUser)) { in getSecureTargetUser() 516 private static boolean isProfileOf(UserManager um, UserHandle otherUser) { in isProfileOf() argument [all …]
|
D | MasterClear.java | 349 final UserManager um = (UserManager) getActivity().getSystemService(Context.USER_SERVICE); in establishInitialState() local 350 loadAccountList(um); in establishInitialState() 453 private void loadAccountList(final UserManager um) { in loadAccountList() argument 459 final List<UserInfo> profiles = um.getProfiles(UserHandle.myUserId()); in loadAccountList() 535 final boolean hasOtherUsers = (um.getUserCount() - profilesSize) > 0; in loadAccountList() 545 final UserManager um = UserManager.get(context); in onCreateView() local 546 final boolean disallow = !um.isAdminUser() || RestrictedLockUtilsInternal in onCreateView()
|
D | TestingSettings.java | 33 final UserManager um = UserManager.get(getContext()); in onCreate() local 34 if (!um.isAdminUser()) { in onCreate()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/ |
D | Utils.java | 199 UserManager um = UserManager.get(context); in getUserManager() local 200 if (um == null) { in getUserManager() 203 return um; in getUserManager() 437 public static int getManagedProfileId(UserManager um, int parentUserId) { in getManagedProfileId() argument 438 int[] profileIds = um.getProfileIdsWithDisabled(parentUserId); in getManagedProfileId() 463 UserManager um, @Nullable Bundle arguments, @Nullable Bundle intentExtras) { in getSecureTargetUser() argument 474 if (isProfileOf(um, launchedFromUser)) { in getSecureTargetUser() 481 if (launchedFromSettingsApp && isProfileOf(um, extrasUser)) { in getSecureTargetUser() 488 if (launchedFromSettingsApp && isProfileOf(um, argumentsUser)) { in getSecureTargetUser() 521 private static boolean isProfileOf(UserManager um, UserHandle otherUser) { in isProfileOf() argument [all …]
|
D | MasterClear.java | 349 final UserManager um = (UserManager) getActivity().getSystemService(Context.USER_SERVICE); in establishInitialState() local 350 loadAccountList(um); in establishInitialState() 454 private void loadAccountList(final UserManager um) { in loadAccountList() argument 460 final List<UserInfo> profiles = um.getProfiles(UserHandle.myUserId()); in loadAccountList() 536 final boolean hasOtherUsers = (um.getUserCount() - profilesSize) > 0; in loadAccountList() 546 final UserManager um = UserManager.get(context); in onCreateView() local 547 final boolean disallow = !um.isAdminUser() || RestrictedLockUtilsInternal in onCreateView()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
D | BluetoothDevicePreferenceTest.java | 151 final UserManager um = mock(UserManager.class); in shouldHideSecondTarget_hasUserRestriction_shouldReturnTrue() local 152 ReflectionHelpers.setField(mPreference, "mUserManager", um); in shouldHideSecondTarget_hasUserRestriction_shouldReturnTrue() 153 when(um.hasUserRestriction(UserManager.DISALLOW_CONFIG_BLUETOOTH)).thenReturn(true); in shouldHideSecondTarget_hasUserRestriction_shouldReturnTrue() 161 final UserManager um = mock(UserManager.class); in shouldHideSecondTarget_hasBoundDeviceAndNoRestriction_shouldReturnFalse() local 162 ReflectionHelpers.setField(mPreference, "mUserManager", um); in shouldHideSecondTarget_hasBoundDeviceAndNoRestriction_shouldReturnFalse() 163 when(um.hasUserRestriction(UserManager.DISALLOW_CONFIG_BLUETOOTH)).thenReturn(false); in shouldHideSecondTarget_hasBoundDeviceAndNoRestriction_shouldReturnFalse()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/ |
D | AudioHelper.java | 45 public int getManagedProfileId(UserManager um) { in getManagedProfileId() argument 46 return Utils.getManagedProfileId(um, UserHandle.myUserId()); in getManagedProfileId() 49 public boolean isUserUnlocked(UserManager um, @UserIdInt int userId) { in isUserUnlocked() argument 50 return um.isUserUnlocked(userId); in isUserUnlocked()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/util/ |
D | UserUtils.java | 54 final UserManager um = getUserManager(context); in getCorpUserInfo() local 55 final int myUser = um.getUserHandle(); in getCorpUserInfo() 58 for (UserInfo ui : um.getUsers()) { in getCorpUserInfo() 62 final UserInfo parent = um.getProfileParent(ui.id); in getCorpUserInfo()
|
/packages/apps/Settings/src/com/android/settings/notification/ |
D | AudioHelper.java | 47 public int getManagedProfileId(UserManager um) { in getManagedProfileId() argument 48 return Utils.getManagedProfileId(um, UserHandle.myUserId()); in getManagedProfileId() 51 public boolean isUserUnlocked(UserManager um, @UserIdInt int userId) { in isUserUnlocked() argument 52 return um.isUserUnlocked(userId); in isUserUnlocked()
|
/packages/apps/Settings/src/com/android/settings/users/ |
D | RestrictionUtils.java | 61 UserManager um = UserManager.get(context); in getRestrictions() local 62 Bundle userRestrictions = um.getUserRestrictions(user); in getRestrictions() 79 UserManager um = UserManager.get(context); in setRestrictions() local 81 um.setUserRestriction(entry.getKey(), !entry.getSelectedState(), user); in setRestrictions()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/users/ |
D | RestrictionUtils.java | 52 UserManager um = UserManager.get(context); in getRestrictions() local 53 Bundle userRestrictions = um.getUserRestrictions(user); in getRestrictions() 70 UserManager um = UserManager.get(context); in setRestrictions() local 73 um.setUserRestriction(entry.getKey(), !entry.getSelectedState(), user); in setRestrictions()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/users/ |
D | RestrictionUtils.java | 61 UserManager um = UserManager.get(context); in getRestrictions() local 62 Bundle userRestrictions = um.getUserRestrictions(user); in getRestrictions() 79 UserManager um = UserManager.get(context); in setRestrictions() local 81 um.setUserRestriction(entry.getKey(), !entry.getSelectedState(), user); in setRestrictions()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/accounts/ |
D | AddAccountSettings.java | 141 final UserManager um = (UserManager) getSystemService(Context.USER_SERVICE); in onCreate() local 142 mUserHandle = Utils.getSecureTargetUser(getActivityToken(), um, null /* arguments */, in onCreate() 144 if (um.hasUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS, mUserHandle)) { in onCreate() 156 if (Utils.startQuietModeDialogIfNecessary(this, um, mUserHandle.getIdentifier())) { in onCreate() 160 if (um.isUserUnlocked(mUserHandle)) { in onCreate()
|
/packages/apps/Settings/src/com/android/settings/accounts/ |
D | AddAccountSettings.java | 141 final UserManager um = (UserManager) getSystemService(Context.USER_SERVICE); in onCreate() local 142 mUserHandle = Utils.getSecureTargetUser(getActivityToken(), um, null /* arguments */, in onCreate() 144 if (um.hasUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS, mUserHandle)) { in onCreate() 156 if (Utils.startQuietModeDialogIfNecessary(this, um, mUserHandle.getIdentifier())) { in onCreate() 160 if (um.isUserUnlocked(mUserHandle)) { in onCreate()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/specialaccess/ |
D | ExternalSources.java | 96 final UserManager um = UserManager.get(getContext()); in canChange() local 97 final int userRestrictionSource = um.getUserRestrictionSource( in canChange() 111 final UserManager um = UserManager.get(getContext()); in getPreferenceSummary() local 112 final int userRestrictionSource = um.getUserRestrictionSource( in getPreferenceSummary()
|
/packages/apps/Settings/src/com/android/settings/deviceinfo/storage/ |
D | UserIconLoader.java | 68 UserManager um = context.getSystemService(UserManager.class); in loadUserIconsWithContext() local 69 for (UserInfo userInfo : um.getUsers()) { in loadUserIconsWithContext() 70 value.put(userInfo.id, Utils.getUserIcon(context, um, userInfo)); in loadUserIconsWithContext()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/deviceinfo/storage/ |
D | UserIconLoader.java | 68 UserManager um = context.getSystemService(UserManager.class); in loadUserIconsWithContext() local 69 for (UserInfo userInfo : um.getUsers()) { in loadUserIconsWithContext() 70 value.put(userInfo.id, Utils.getUserIcon(context, um, userInfo)); in loadUserIconsWithContext()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/dashboard/profileselector/ |
D | UserAdapter.java | 52 public UserDetails(UserHandle userHandle, UserManager um, Context context) { in UserDetails() argument 54 UserInfo userInfo = um.getUserInfo(mUserHandle.getIdentifier()); in UserDetails() 63 if (um.getUserIcon(userId) != null) { in UserDetails() 64 icon = new BitmapDrawable(context.getResources(), um.getUserIcon(userId)); in UserDetails()
|
/packages/apps/Settings/src/com/android/settings/dashboard/profileselector/ |
D | UserAdapter.java | 52 public UserDetails(UserHandle userHandle, UserManager um, Context context) { in UserDetails() argument 54 UserInfo userInfo = um.getUserInfo(mUserHandle.getIdentifier()); in UserDetails() 63 if (um.getUserIcon(userId) != null) { in UserDetails() 64 icon = new BitmapDrawable(context.getResources(), um.getUserIcon(userId)); in UserDetails()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/ |
D | ApplicationsUtilsTest.java | 81 CarUserManagerHelper um = mock(CarUserManagerHelper.class); in isProfileOrDeviceOwner_profileOwner_returnsTrue() local 82 when(um.getAllUsers()).thenReturn(Collections.singletonList(userInfo)); in isProfileOrDeviceOwner_profileOwner_returnsTrue() 86 assertThat(ApplicationsUtils.isProfileOrDeviceOwner(PACKAGE_NAME, dpm, um)).isTrue(); in isProfileOrDeviceOwner_profileOwner_returnsTrue()
|
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
D | CalendarSanityChecker.java | 93 final UserManager um = mContext.getSystemService(UserManager.class); in getUserUnlockTime() local 94 final long startTime = um.getUserStartRealtime(); in getUserUnlockTime() 95 final long unlockTime = um.getUserUnlockRealtime(); in getUserUnlockTime()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/screenlock/ |
D | LockAfterTimeoutPreferenceControllerTest.java | 120 final UserManager um = mock(UserManager.class); in testUpdateStateWithAdminTimeouts() local 121 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(um); in testUpdateStateWithAdminTimeouts() 122 when(um.getProfiles(userId)).thenReturn(Collections.emptyList()); in testUpdateStateWithAdminTimeouts()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/appinfo/ |
D | ExternalSourcesDetails.java | 84 final UserManager um = UserManager.get(context); in getPreferenceSummary() local 85 final int userRestrictionSource = um.getUserRestrictionSource( in getPreferenceSummary() 87 | um.getUserRestrictionSource( in getPreferenceSummary()
|
/packages/apps/Settings/src/com/android/settings/applications/appinfo/ |
D | ExternalSourcesDetails.java | 88 final UserManager um = UserManager.get(context); in getPreferenceSummary() local 89 final int userRestrictionSource = um.getUserRestrictionSource( in getPreferenceSummary() 91 | um.getUserRestrictionSource( in getPreferenceSummary()
|