/cts/tests/tests/car_builtin/src/android/car/cts/builtin/os/ |
D | UserManagerHelperLiteTest.java | 56 private final UserManager mUserManager = mContext.getSystemService(UserManager.class); field in UserManagerHelperLiteTest 72 UserManagerHelper.isEphemeralUser(mUserManager, currentUser)).isFalse(); in testMultiplePropertiesForCurrentUser() 74 UserManagerHelper.isFullUser(mUserManager, currentUser)).isTrue(); in testMultiplePropertiesForCurrentUser() 76 UserManagerHelper.isGuestUser(mUserManager, currentUser)).isFalse(); in testMultiplePropertiesForCurrentUser() 80 UserManagerHelper.isEnabledUser(mUserManager, currentUser)).isTrue(); in testMultiplePropertiesForCurrentUser() 84 UserManagerHelper.isInitializedUser(mUserManager, currentUser)).isTrue(); in testMultiplePropertiesForCurrentUser() 104 UserManagerHelper.isEphemeralUser(mUserManager, systemUser)).isFalse(); in testMultiplePropertiesForFullSystemUser() 106 UserManagerHelper.isFullUser(mUserManager, systemUser)).isTrue(); in testMultiplePropertiesForFullSystemUser() 108 UserManagerHelper.isGuestUser(mUserManager, systemUser)).isFalse(); in testMultiplePropertiesForFullSystemUser() 110 UserManagerHelper.isEnabledUser(mUserManager, systemUser)).isTrue(); in testMultiplePropertiesForFullSystemUser() [all …]
|
D | UserManagerHelperHeavyTest.java | 62 private final UserManager mUserManager = mContext.getSystemService(UserManager.class); field in UserManagerHelperHeavyTest 71 boolean result = mUserManager.removeUser(mUserToRemove); in cleanUp() 93 assertThat(UserManagerHelper.isGuestUser(mUserManager, guestUser)).isTrue(); in testMultiplePropertiesForGuestUser() 94 assertThat(UserManagerHelper.isEphemeralUser(mUserManager, guestUser)).isTrue(); in testMultiplePropertiesForGuestUser() 95 assertThat(UserManagerHelper.isFullUser(mUserManager, guestUser)).isTrue(); in testMultiplePropertiesForGuestUser() 96 assertThat(UserManagerHelper.isEnabledUser(mUserManager, guestUser)).isTrue(); in testMultiplePropertiesForGuestUser() 101 assertThat(UserManagerHelper.isInitializedUser(mUserManager, guestUser)).isFalse(); in testMultiplePropertiesForGuestUser() 119 assertThat(UserManagerHelper.isEphemeralUser(mUserManager, fullUser)).isFalse(); in testMultiplePropertiesForSecondaryFullUser() 120 assertThat(UserManagerHelper.isGuestUser(mUserManager, fullUser)).isFalse(); in testMultiplePropertiesForSecondaryFullUser() 121 assertThat(UserManagerHelper.isFullUser(mUserManager, fullUser)).isTrue(); in testMultiplePropertiesForSecondaryFullUser() [all …]
|
/cts/tests/tests/multiuser/src/android/multiuser/cts/ |
D | UserManagerTest.java | 126 private UserManager mUserManager; field in UserManagerTest 133 mUserManager = sContext.getSystemService(UserManager.class); in setUp() 134 assertWithMessage("UserManager service").that(mUserManager).isNotNull(); in setUp() 143 assertThat(mUserManager.removeUser(userHandle)).isTrue(); in removeUser() 152 assertWithMessage("isUserAGoat()").that(mUserManager.isUserAGoat()).isFalse(); in testUserGoat_api30() 163 assertTrue(mUserManager.isAdminUser()); in testIsAdminUserOnInitialUser_noPermission() 250 assumeTrue(mUserManager.supportsMultipleUsers()); in testIsUserForeground_differentContext_noPermission() 269 assumeTrue(mUserManager.supportsMultipleUsers()); in testIsUserForeground_differentContext_withPermission() 282 .that(mUserManager.isUserForeground()).isTrue(); in testIsUserForeground_currentUser() 290 .that(mUserManager.isUserForeground()).isFalse(); in testIsUserForeground_backgroundUser() [all …]
|
D | UserVisibilityTest.java | 87 .that(mUserManager.isUserVisible()).isTrue(); in testIsUserVisible_currentUser() 95 .that(mUserManager.isUserVisible()).isFalse(); in testIsUserVisible_backgroundUser() 104 sContext.getUser()).that(mUserManager.isUserVisible()).isTrue(); in testIsUserVisible_startedProfileOfCurrentUser() 141 Collection<UserHandle> visibleUsers = mUserManager.getVisibleUsers(); in testGetVisibleUsers_currentUser() 152 Collection<UserHandle> visibleUsers = mUserManager.getVisibleUsers(); in testGetVisibleUsers_backgroundUser() 165 Collection<UserHandle> visibleUsers = mUserManager.getVisibleUsers(); in testGetVisibleUsers_startedProfileOfCurrentUser() 186 Collection<UserHandle> visibleUsers = mUserManager.getVisibleUsers(); in testGetVisibleUsers_stoppedProfileOfCurrentUser()
|
D | UserVisibilityTestCase.java | 73 protected UserManager mUserManager; field in UserVisibilityTestCase 77 mUserManager = sContext.getSystemService(UserManager.class); in setUp() 78 assertWithMessage("UserManager service").that(mUserManager).isNotNull(); in setUp()
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | UserManagerTest.java | 34 private UserManager mUserManager; field in UserManagerTest 40 mUserManager = mContext.getSystemService(UserManager.class); in setUp() 51 List<UserHandle> profiles = mUserManager.getAllProfiles(); in testGetAllProfiles() 59 UserHandle newProfile = mUserManager.createProfile("testProfile1", in testCreateProfile_managedProfile() 63 List<UserHandle> profiles = mUserManager.getAllProfiles(); in testCreateProfile_managedProfile() 72 assertThat(mUserManager.isProfile()).isTrue(); in testIsProfileReturnsTrue_runAsProfile() 80 assertThat(mUserManager.isProfile()).isFalse(); in testIsProfileReturnsFalse_runAsPrimary()
|
D | CrossProfileTest.java | 84 private UserManager mUserManager; field in CrossProfileTest 91 mUserManager = mContext.getSystemService(UserManager.class); in setUp() 244 for (UserHandle profile : mUserManager.getUserProfiles()) { in explicitlySetInteractAcrossProfilesAppOp()
|
/cts/hostsidetests/devicepolicy/app/AppRestrictionsTargetApp/src/com/android/cts/apprestrictions/targetapp/ |
D | ApplicationRestrictionsActivity.java | 41 private UserManager mUserManager; field in ApplicationRestrictionsActivity 48 mUserManager = isDeviceOwnerTest in onCreate() 51 Log.d(TAG, "onCreate(): isDeviceOwnerTest=" + isDeviceOwnerTest + ", um=" + mUserManager); in onCreate() 63 Bundle restrictions = mUserManager.getApplicationRestrictions(getPackageName()); in handleIntent() 64 Log.d(TAG, "restrictions on user " + Process.myUid() + " and " + mUserManager + ": " in handleIntent()
|
/cts/tests/tests/car/src/android/car/server/wm/cts/ |
D | MultiUserMultiDisplayPolicyTest.java | 34 private UserManager mUserManager; field in MultiUserMultiDisplayPolicyTest 38 mUserManager = mContext.getSystemService(UserManager.class); in setUp() 39 assumeTrue(mUserManager.isVisibleBackgroundUsersSupported()); in setUp()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | UserRestrictionsParentTest.java | 52 private UserManager mUserManager; field in UserRestrictionsParentTest 78 mUserManager = mContext.getSystemService(UserManager.class); in setUp() 79 assertNotNull(mUserManager); in setUp() 113 assertThat(mUserManager. in testHasUserRestrictionDisallowConfigDateTime() 120 if (!mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_DATE_TIME)) { in testUserRestrictionDisallowConfigDateTimeIsNotPersisted() 232 boolean hasRestrictionOnManagedProfile = mUserManager.hasUserRestriction( in testPerProfileUserRestriction_onParent() 239 assertThat(mUserManager.hasUserRestriction(restriction)).isEqualTo( in testPerProfileUserRestriction_onParent() 273 assertThat(mUserManager.hasUserRestriction(restriction)).isTrue(); in testPerDeviceUserRestriction_onParent() 278 assertThat(mUserManager.hasUserRestriction(restriction)).isFalse(); in testPerDeviceUserRestriction_onParent()
|
D | BaseDeviceAdminTest.java | 137 protected UserManager mUserManager; field in BaseDeviceAdminTest 151 mUserManager = mContext.getSystemService(UserManager.class); in setUp() 152 assertWithMessage("userManager").that(mUserManager).isNotNull(); in setUp() 207 boolean isUserUnlocked = mUserManager.isUserUnlocked(); in waitUntilUserUnlocked() 217 assertWithMessage("user unlocked").that(mUserManager.isUserUnlocked()).isTrue(); in waitUntilUserUnlocked()
|
D | CustomizationRestrictionsTest.java | 120 assertTrue(mUserManager.hasUserRestriction(UserManager.DISALLOW_SET_WALLPAPER)); in testDisallowSetWallpaper_allowed() 146 assertFalse(mUserManager.hasUserRestriction(UserManager.DISALLOW_SET_WALLPAPER)); in testDisallowSetWallpaper_allowed()
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | PrivateDnsPolicyTest.java | 34 private UserManager mUserManager; field in PrivateDnsPolicyTest 39 mUserManager = mContext.getSystemService(UserManager.class); in setUp() 40 assertNotNull(mUserManager); in setUp() 52 assertThat(mUserManager.hasUserRestriction( in testDisallowPrivateDnsConfigurationRestriction() 58 assertThat(mUserManager.hasUserRestriction( in testClearDisallowPrivateDnsConfigurationRestriction()
|
D | HeadlessSystemUserTest.java | 45 private UserManager mUserManager; field in HeadlessSystemUserTest 52 mUserManager = mContext.getSystemService(UserManager.class); in setUp() 67 user = callWithShellPermissionIdentity(() -> mUserManager in testProfileOwnerIsSetOnNewUser() 88 () -> mUserManager.removeUser(userId)); in testProfileOwnerIsSetOnNewUser()
|
/cts/hostsidetests/multiuser/app/src/com/android/cts/multiuser/ |
D | UserOperationsTest.java | 34 private UserManager mUserManager; field in UserOperationsTest 39 mUserManager = mContext.getSystemService(UserManager.class); in setUp() 59 int result = mUserManager.removeUserWhenPossible(UserHandle.of(userId), in removeUserWhenPossibleDeviceSide()
|
D | UserManagerAppTest.java | 36 private final UserManager mUserManager = field in UserManagerAppTest 47 assertThat(mUserManager.getPreviousForegroundUser()) in getPreviousForegroundUserReturnsExpected()
|
/cts/tests/tests/security/src/android/security/cts/CVE_2024_0024/ |
D | CVE_2024_0024.java | 61 UserManager mUserManager = null; field in CVE_2024_0024 70 mUserManager = context.getSystemService(UserManager.class); in grantSmsPermission() 74 .that(mUserManager.supportsMultipleUsers()) in grantSmsPermission() 128 mUserManager.getUsers(); in grantSmsPermission() 163 mUserManager.removeUser(mUserInfo.id); in grantSmsPermission()
|
/cts/tests/camera/headlessSystemUserTest/src/android/camera/cts/headlesssystemusertest/ |
D | Camera2HeadlessSystemUserTest.java | 68 private UserManager mUserManager; field in Camera2HeadlessSystemUserTest 86 mUserManager = mContext.getSystemService(UserManager.class); in setUp() 87 assertNotNull("Can't get user manager", mUserManager); in setUp() 109 assumeTrue(mUserManager.isSystemUser()); in testHeadlessSystemUser_OpenCamera() 136 assumeTrue(mUserManager.isSystemUser()); in testHeadlessSystemUser_InvalidAccess() 164 assumeTrue(mUserManager.isSystemUser()); in testHeadlessSystemUser_SwitchForegroundUser()
|
/cts/tests/tests/car/src/android/car/cts/ |
D | CarInputManagerSystemTest.java | 56 private UserManager mUserManager; field in CarInputManagerSystemTest 62 mUserManager = mContext.getSystemService(UserManager.class); in setUp() 87 mUserManager.isVisibleBackgroundUsersSupported()); in testCarInputService_injectKeyEvent()
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/users/ |
D | UserReference.java | 91 private final UserManager mUserManager; field in UserReference 112 mUserManager = TestApis.context().androidContextAsUser(this) in UserReference() 160 return mUserManager.isMainUser(); in isMain() 483 + mUserManager.isUserRunning(userHandle())); in isRunning() 484 return mUserManager.isUserRunning(userHandle()); in isRunning() 500 boolean isIt = mUserManager.isUserVisible(); in isVisible() 515 boolean isIt = mUserManager.isUserForeground(); in isForeground() 540 + mUserManager.isUserUnlocked(userHandle())); in isUnlocked() 541 return mUserManager.isUserUnlocked(userHandle()); in isUnlocked() 556 String userTypeName = TestApisReflectionKt.getUserType(mUserManager); in type() [all …]
|
/cts/hostsidetests/shortcuts/deviceside/common/src/android/content/pm/cts/shortcut/device/common/ |
D | ShortcutManagerDeviceTestBase.java | 44 private UserManager mUserManager; field in ShortcutManagerDeviceTestBase 62 mUserManager = getContext().getSystemService(UserManager.class); in setUp() 66 mUserManager, UserManager::isManagedProfile); in setUp()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/userrestrictions/ |
D | BaseUserRestrictionsTest.java | 123 expected, mUserManager.hasUserRestriction(restriction)); in assertLayeredRestriction() 134 return ShellIdentityUtils.invokeMethodWithShellPermissions(mUserManager, in hasBaseUserRestriction() 156 final boolean hadRestriction = mUserManager.hasUserRestriction(restriction); in assertSetClearUserRestriction() 194 final boolean hadRestriction = mUserManager.hasUserRestriction(restriction); in assertCannotSetUserRestriction()
|
D | DeviceOwnerUserRestrictionsTest.java | 101 mUserManager.hasUserRestriction(r, userHandle)); in testHasBaseUserRestrictions() 107 mUserManager.hasUserRestriction(r, userHandle)); in testHasBaseUserRestrictions()
|
D | ProfileGlobalRestrictionsTest.java | 25 expected, mUserManager.hasUserRestriction(restriction)); in assertRestriction()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
D | VpnTestActivity.java | 57 private UserManager mUserManager; field in VpnTestActivity 71 mUserManager = (UserManager) getSystemService(Context.USER_SERVICE); in onCreate()
|