/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/ota/ |
D | OtaControllerTest.java | 99 when(mUserManager.getProfiles(UserHandle.USER_SYSTEM)).thenReturn(mProfiles); in setUp() 113 setDeviceOwner(UserHandle.USER_SYSTEM, ADMIN_COMPONENT); in testDeviceOwnerSystemUser() 120 Pair.create(UserHandle.USER_SYSTEM, MigrateSystemAppsSnapshotTask.class), in testDeviceOwnerSystemUser() 121 Pair.create(UserHandle.USER_SYSTEM, DeleteNonRequiredAppsTask.class), in testDeviceOwnerSystemUser() 122 Pair.create(UserHandle.USER_SYSTEM, DisallowAddUserTask.class), in testDeviceOwnerSystemUser() 123 Pair.create(UserHandle.USER_SYSTEM, UpdateInteractAcrossProfilesAppOpTask.class)); in testDeviceOwnerSystemUser() 126 verify(mDevicePolicyManager).resetDefaultCrossProfileIntentFilters(UserHandle.USER_SYSTEM); in testDeviceOwnerSystemUser() 143 Pair.create(UserHandle.USER_SYSTEM, MigrateSystemAppsSnapshotTask.class), in testManagedProfileWithoutMissingSystemIme() 146 Pair.create(UserHandle.USER_SYSTEM, UpdateInteractAcrossProfilesAppOpTask.class)); in testManagedProfileWithoutMissingSystemIme() 149 verify(mDevicePolicyManager).resetDefaultCrossProfileIntentFilters(UserHandle.USER_SYSTEM); in testManagedProfileWithoutMissingSystemIme() [all …]
|
/packages/modules/Connectivity/tests/common/java/android/net/ |
D | UidRangeTest.java | 21 import static android.os.UserHandle.USER_SYSTEM; 96 getUid(USER_SYSTEM, 10000), getUid(USER_SYSTEM, 10100)); in testGetStartAndEndUser() 99 assertEquals(USER_SYSTEM, uidRangeOfPrimaryUser.getStartUser()); in testGetStartAndEndUser() 100 assertEquals(USER_SYSTEM, uidRangeOfPrimaryUser.getEndUser()); in testGetStartAndEndUser() 105 getUid(USER_SYSTEM, 10000), getUid(MIN_SECONDARY_USER_ID, 10100)); in testGetStartAndEndUser() 106 assertEquals(USER_SYSTEM, uidRangeOfPrimaryUser.getStartUser()); in testGetStartAndEndUser() 114 UserHandle.of(USER_SYSTEM + 1)); in testCreateForUser() 116 assertEquals(USER_SYSTEM, uidRangeOfPrimaryUser.getStartUser()); in testCreateForUser() 117 assertEquals(USER_SYSTEM, uidRangeOfPrimaryUser.getEndUser()); in testCreateForUser() 118 assertEquals(USER_SYSTEM + 1, uidRangeOfSecondaryUser.getStartUser()); in testCreateForUser() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/ |
D | InitialUserSetterTest.java | 20 import static android.os.UserHandle.USER_SYSTEM; 182 UserHandle user = expectSystemUserExists(mMockedUserHandleHelper, UserHandle.USER_SYSTEM); in testSwitchUser_ok_systemUser() 183 expectSwitchUser(UserHandle.USER_SYSTEM); in testSwitchUser_ok_systemUser() 186 .setSwitchUserId(UserHandle.USER_SYSTEM) in testSwitchUser_ok_systemUser() 189 verifyUserSwitched(UserHandle.USER_SYSTEM); in testSwitchUser_ok_systemUser() 856 expectAmStartFgUser(UserHandle.USER_SYSTEM, /* toBeReturned= */ true); in testStartForegroundUser_nonHeadlessSystemUser() 858 assertThat(mSetter.startForegroundUser(INITIAL_USER_INFO_RESUME, UserHandle.USER_SYSTEM)) in testStartForegroundUser_nonHeadlessSystemUser() 866 assertThat(mSetter.startForegroundUser(INITIAL_USER_INFO_RESUME, UserHandle.USER_SYSTEM)) in testStartForegroundUser_headlessSystemUser() 869 verify(() -> ActivityManagerHelper.startUserInForeground(UserHandle.USER_SYSTEM), never()); in testStartForegroundUser_headlessSystemUser() 875 mockGetAliveUsers(USER_SYSTEM, 10, 11, 12); in testGetInitialUser_WithValidLastActiveUser_ReturnsLastActiveUser() [all …]
|
/packages/modules/IntentResolver/tests/unit/src/com/android/intentresolver/data/repository/ |
D | UserRepositoryImplTest.kt | 22 import android.os.UserHandle.USER_SYSTEM 138 mockUserManager(validUser = USER_SYSTEM, invalidUser = UserHandle.USER_NULL) in <lambda>() 151 assertThat(users).containsExactly(User(USER_SYSTEM, Role.PERSONAL)) in <lambda>() 157 mockUserManager(validUser = USER_SYSTEM, invalidUser = UserHandle.USER_NULL) in <lambda>() 170 assertThat(users).containsExactly(User(USER_SYSTEM, Role.PERSONAL)) in <lambda>() 176 mockUserManager(validUser = USER_SYSTEM, invalidUser = UserHandle.USER_NULL) in <lambda>() 183 assertThat(users).containsExactly(User(USER_SYSTEM, Role.PERSONAL)) in <lambda>() 189 mockUserManager(validUser = USER_SYSTEM, invalidUser = UserHandle.USER_NULL) in <lambda>() 202 assertThat(users).containsExactly(User(USER_SYSTEM, Role.PERSONAL)) in <lambda>()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/users/ |
D | AutoSyncWorkDataPreferenceControllerTest.java | 85 infos.add(new UserInfo(UserHandle.USER_SYSTEM, "user 1", 0 /* flags */)); in checkIsAvailable_singleUserProfile_shouldNotDisplay() 86 when(mUserManager.getProfiles(eq(UserHandle.USER_SYSTEM))).thenReturn(infos); in checkIsAvailable_singleUserProfile_shouldNotDisplay() 97 infos.add(new UserInfo(UserHandle.USER_SYSTEM, "user 1", 0 /* flags */)); in checkIsAvailable_null_workProfileUserHandle_shouldNotDisplay() 99 when(mUserManager.getProfiles(eq(UserHandle.USER_SYSTEM))).thenReturn(infos); in checkIsAvailable_null_workProfileUserHandle_shouldNotDisplay() 112 infos.add(new UserInfo(UserHandle.USER_SYSTEM, "user 1", 0 /* flags */)); in multipleProfile_shouldInitWithWorkProfileUserHandle() 115 when(mUserManager.getProfiles(eq(UserHandle.USER_SYSTEM))).thenReturn(infos); in multipleProfile_shouldInitWithWorkProfileUserHandle()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/ |
D | MigrateSystemAppsSnapshotTaskTest.java | 114 mMigrateSystemAppsSnapshotTask.run(UserHandle.USER_SYSTEM); in testRun_nothingToMigrate() 123 mMigrateSystemAppsSnapshotTask.run(UserHandle.USER_SYSTEM); in testRun_alreadyMigrated() 134 mMigrateSystemAppsSnapshotTask.run(UserHandle.USER_SYSTEM); in testRun_migrate_userExists() 146 mMigrateSystemAppsSnapshotTask.run(UserHandle.USER_SYSTEM); in testRun_migrate_userDoesNotExists() 156 mMigrateSystemAppsSnapshotTask.run(UserHandle.USER_SYSTEM); in testRun_migrate_invalidFileName()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/profiles/ |
D | ProfileHelperTest.java | 124 UserInfo systemUser = createAdminUser(UserHandle.USER_SYSTEM); in testGetAllsers() 144 UserInfo systemUser = createAdminUser(UserHandle.USER_SYSTEM); in testGetAllUsers_notHeadless() 163 UserInfo systemUser = createAdminUser(UserHandle.USER_SYSTEM); in testGetAllSwitchableUsers() 182 UserInfo systemUser = createAdminUser(UserHandle.USER_SYSTEM); in testGetAllSwitchableUsers_notHeadless() 200 UserInfo systemUser = createAdminUser(UserHandle.USER_SYSTEM); in testGetAllPersistentUsers() 221 UserInfo systemUser = createAdminUser(UserHandle.USER_SYSTEM); in testGetAllPersistentUsers_notHeadless() 241 UserInfo systemUser = createAdminUser(UserHandle.USER_SYSTEM); in testGetAllAdminUsers() 261 UserInfo systemUser = createAdminUser(UserHandle.USER_SYSTEM); in testGetAllAdminUsers_notHeadless() 279 UserHandle.USER_SYSTEM, in testRemoveUser_isAdminUser_cannotRemoveSystemUser()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/system/ |
D | InputOptionsFragment.java | 72 TvInputInfo.TvInputSettings.getCustomLabels(context, UserHandle.USER_SYSTEM); in onCreate() 74 TvInputInfo.TvInputSettings.getHiddenTvInputIds(context, UserHandle.USER_SYSTEM); in onCreate() 171 .putCustomLabels(getContext(), mCustomLabels, UserHandle.USER_SYSTEM); in setInputName() 188 .putHiddenTvInputs(getContext(), mHiddenIds, UserHandle.USER_SYSTEM); in setInputVisible()
|
D | FallbackHome.java | 19 import static android.os.UserHandle.USER_SYSTEM; 128 getLockSettings().checkCredential(pin, USER_SYSTEM, null); in unlockDeviceWithPin()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/pm/ |
D | VendorServiceControllerTest.java | 196 mockGetCurrentUser(UserHandle.USER_SYSTEM); in init_systemUser() 209 mockGetCurrentUser(UserHandle.USER_SYSTEM); in testBindService_callsUnbindServiceWhenFalseReturned() 225 mockGetCurrentUser(UserHandle.USER_SYSTEM); in testOnNullBinding_callsUnbindService() 239 mockUserUnlock(UserHandle.USER_SYSTEM); in systemUserUnlocked() 241 UserHandle.USER_SYSTEM); in systemUserUnlocked() 251 mockGetCurrentUser(UserHandle.USER_SYSTEM); in fgUserUnlocked() 283 mockGetCurrentUser(UserHandle.USER_SYSTEM); in testVisibleUsers() 351 mockGetCurrentUser(UserHandle.USER_SYSTEM); in packageChanged_bindsTheService() 383 mockGetCurrentUser(UserHandle.USER_SYSTEM); in packageRemoved_unbindsTheService() 417 mockGetCurrentUser(UserHandle.USER_SYSTEM); in powerStateResume_bindsSystemService()
|
/packages/apps/Settings/src/com/android/settings/development/ |
D | OverlayCategoryPreferenceController.java | 19 import static android.os.UserHandle.USER_SYSTEM; 124 return mOverlayManager.setEnabled(currentPackageName, false, USER_SYSTEM); in setOverlay() 127 USER_SYSTEM); in setOverlay() 185 .getOverlayInfosForTarget(OVERLAY_TARGET_PACKAGE, USER_SYSTEM); in getOverlayInfos()
|
/packages/apps/TvSettings/unbundle/java/com/android/tv/settings/unbundle/sdklib/ |
D | UserHandleCompat.java | 47 int USER_SYSTEM = UserHandle.USER_SYSTEM; field in UserHandleCompat
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/finalization/ |
D | UserProvisioningStateHelper.java | 172 setUserProvisioningState(STATE_USER_UNMANAGED, UserHandle.USER_SYSTEM); in resetPrimaryUserProvisioningState() 193 && mMyUserId != UserHandle.USER_SYSTEM) { in maybeSetHeadlessSystemUserProvisioningState() 196 setUserProvisioningState(newState, UserHandle.USER_SYSTEM); in maybeSetHeadlessSystemUserProvisioningState()
|
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/users/ |
D | CarSystemUIUserUtilTest.java | 91 when(mContext.getUserId()).thenReturn(UserHandle.USER_SYSTEM); in getCurrentUserHandle_userTrackerNull_headlessSystemUser_returnsAmUser() 100 when(mContext.getUserId()).thenReturn(UserHandle.USER_SYSTEM); in getCurrentUserHandle_userTrackerNull_nonHeadlessSystemUser_returnsContextUser() 105 assertThat(userHandle.getIdentifier()).isEqualTo(UserHandle.USER_SYSTEM); in getCurrentUserHandle_userTrackerNull_nonHeadlessSystemUser_returnsContextUser()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/userpicker/ |
D | ActivityHelper.java | 19 import static android.os.UserHandle.USER_SYSTEM; 40 if (userId != USER_SYSTEM) { in startUserPickerAsUserSystem()
|
/packages/services/Car/tests/carservice_unit_test/src/android/car/userlib/ |
D | UserHelperLiteTest.java | 57 assertThat(UserHelperLite.isHeadlessSystemUser(UserHandle.USER_SYSTEM)).isTrue(); in testIsHeadlessSystemUser_system_headlessMode() 64 assertThat(UserHelperLite.isHeadlessSystemUser(UserHandle.USER_SYSTEM)).isFalse(); in testIsHeadlessSystemUser_system_nonHeadlessMode()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | ConfigurationMapTest.java | 83 USER_PROFILES.put(UserHandle.USER_SYSTEM, Arrays.asList( in USER_PROFILES.put() argument 84 new UserInfo(UserHandle.USER_SYSTEM, "Owner", 0), in USER_PROFILES.put() argument 97 private int mCurrentUserId = UserHandle.USER_SYSTEM; 127 if (userId == UserHandle.USER_SYSTEM in setUp() 132 && mCurrentUserId == UserHandle.USER_SYSTEM) { in setUp()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/privacy/ |
D | PrivacyElementsProviderImpl.java | 19 import static android.os.UserHandle.USER_SYSTEM; 110 if (!optionalUserInfo.isPresent() && userId != USER_SYSTEM) return; in createPrivacyElements() 113 optionalUserInfo.orElseGet(() -> mUserManager.getUserInfo(USER_SYSTEM)); in createPrivacyElements()
|
/packages/modules/Permission/service/java/com/android/permission/util/ |
D | UserUtils.java | 51 userId >= UserHandleCompat.USER_SYSTEM in enforceCrossUserPermission() 56 if (callingUid != Process.SHELL_UID || userId < UserHandleCompat.USER_SYSTEM) { in enforceCrossUserPermission()
|
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/input/ |
D | DisplayInputSinkControllerTest.java | 166 doReturn(UserHandle.USER_SYSTEM).when(() -> UserHandle.myUserId()); in start_systemUser_controllerStarted() 221 doReturn(UserHandle.USER_SYSTEM).when(() -> UserHandle.myUserId()); in onDisplayAdded_withValidDisplay_callsStartDisplayInputLock() 247 doReturn(UserHandle.USER_SYSTEM).when(() -> UserHandle.myUserId()); in onDisplayRemoved_inputLockStarted_callsStopDisplayInputLock() 407 doReturn(UserHandle.USER_SYSTEM).when(() -> UserHandle.myUserId()); in displayInputMonitorCallback_triggers_notifyUserActivity() 424 doReturn(UserHandle.USER_SYSTEM).when(() -> UserHandle.myUserId()); in displayInputLockCallback_triggers_notifyUserActivity()
|
/packages/services/Car/car-builtin-lib/src/android/car/builtin/os/ |
D | UserManagerHelper.java | 46 public static final @UserIdInt int USER_SYSTEM = UserHandle.USER_SYSTEM; field in UserManagerHelper
|
/packages/services/Car/tests/CarLibUnitTest/src/android/car/user/ |
D | CarUserManagerUnitTest.java | 21 import static android.os.UserHandle.USER_SYSTEM; 145 setExistingUsers(USER_SYSTEM); in testIsValidUserId_headlessSystemUser() 147 assertThat(mMgr.isValidUser(USER_SYSTEM)).isFalse(); in testIsValidUserId_headlessSystemUser() 152 setExistingUsers(USER_SYSTEM); in testIsValidUser_headlessSystemUser() 160 setExistingUsers(USER_SYSTEM); in testIsValidUserId_nonHeadlessSystemUser() 162 assertThat(mMgr.isValidUser(USER_SYSTEM)).isTrue(); in testIsValidUserId_nonHeadlessSystemUser() 168 setExistingUsers(USER_SYSTEM); in testIsValidUser_nonHeadlessSystemUser()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/ |
D | UtilsTest.java | 102 UserHandle userHandle = new UserHandle(UserHandle.USER_SYSTEM); in blockedByLocationOff() 116 UserHandle userHandle = new UserHandle(UserHandle.USER_SYSTEM); in checkCallerHasCoarseLocation_doesNotCrash() 135 UserHandle userHandle = new UserHandle(UserHandle.USER_SYSTEM); in checkCallerHasCoarseOrFineLocation_doesNotCrash()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/users/ |
D | CarMUPANDUserTrackerImpl.java | 80 if (userId == getUserId() && userId != UserHandle.USER_SYSTEM) { 86 performUserSwitch(UserHandle.USER_SYSTEM);
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/provisioning/ |
D | AbstractProvisioningController.java | 207 if (UserManager.isHeadlessSystemUserMode() && mUserId != UserHandle.USER_SYSTEM) { in addDownloadAndInstallDeviceOwnerPackageTasks() 211 mParams, /* callback= */ this, UserHandle.USER_SYSTEM)); in addDownloadAndInstallDeviceOwnerPackageTasks()
|