Home
last modified time | relevance | path

Searched refs:mUserManager (Results 1 – 17 of 17) sorted by relevance

/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DUserManagerTest.java34 private UserManager mUserManager; field in UserManagerTest
40 mUserManager = mContext.getSystemService(UserManager.class); in setUp()
51 assertTrue(mUserManager.isManagedProfile()); in testIsManagedProfileReturnsTrue()
55 assertFalse(mUserManager.isManagedProfile()); in testIsManagedProfileReturnsFalse()
59 List<UserHandle> profiles = mUserManager.getAllProfiles(); in testGetAllProfiles()
67 UserHandle newProfile = mUserManager.createProfile("testProfile1", in testCreateProfile_managedProfile()
71 List<UserHandle> profiles = mUserManager.getAllProfiles(); in testCreateProfile_managedProfile()
80 assertThat(mUserManager.isProfile()).isTrue(); in testIsProfileReturnsTrue_runAsProfile()
88 assertThat(mUserManager.isProfile()).isFalse(); in testIsProfileReturnsFalse_runAsPrimary()
/cts/tests/tests/multiuser/src/android/multiuser/cts/
DUserManagerTest.java50 private UserManager mUserManager; field in UserManagerTest
54 mUserManager = mContext.getSystemService(UserManager.class); in setTestFixtures()
56 assertWithMessage("UserManager service").that(mUserManager).isNotNull(); in setTestFixtures()
65 assertWithMessage("isUserAGoat()").that(mUserManager.isUserAGoat()).isFalse(); in testUserGoat_api30()
79 .that(mUserManager.isUserForeground()).isTrue(); in testIsUserForeground_currentUser()
91 UserHandle userHandle = mUserManager.createProfile( in testCloneUser()
102 List<UserInfo> list = mUserManager.getUsers(true, true, true); in testCloneUser()
109 assertThat(mUserManager.removeUser(userHandle)).isTrue(); in testCloneUser()
/cts/hostsidetests/devicepolicy/app/AppRestrictionsTargetApp/src/com/android/cts/apprestrictions/targetapp/
DApplicationRestrictionsActivity.java41 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/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DPrivateDnsPolicyTest.java33 private UserManager mUserManager; field in PrivateDnsPolicyTest
38 mUserManager = mContext.getSystemService(UserManager.class); in setUp()
39 assertNotNull(mUserManager); in setUp()
51 assertThat(mUserManager.hasUserRestriction( in testDisallowPrivateDnsConfigurationRestriction()
57 assertThat(mUserManager.hasUserRestriction( in testClearDisallowPrivateDnsConfigurationRestriction()
DHeadlessSystemUserTest.java45 private UserManager mUserManager; field in HeadlessSystemUserTest
52 mUserManager = mContext.getSystemService(UserManager.class); in setUp()
67 user = callWithShellPermissionIdentity(() -> mUserManager in testProfileOwnerIsSetOnNewUser()
86 () -> mUserManager.removeUser(userId)); in testProfileOwnerIsSetOnNewUser()
/cts/hostsidetests/devicepolicy/app/LauncherTests/src/com/android/cts/launchertests/
DQuietModeTest.java76 private UserManager mUserManager; field in QuietModeTest
85 mUserManager = mContext.getSystemService(UserManager.class); in setupUserManager()
121 assertTrue(mUserManager.isQuietModeEnabled(mTargetUser)); in testTryEnableQuietMode_defaultForegroundLauncher()
125 assertFalse(mUserManager.isQuietModeEnabled(mTargetUser)); in testTryEnableQuietMode_defaultForegroundLauncher()
133 assertFalse(mUserManager.isQuietModeEnabled(mTargetUser)); in testTryEnableQuietMode_notForegroundLauncher()
141 assertFalse(mUserManager.isQuietModeEnabled(mTargetUser)); in testTryEnableQuietMode_notDefaultLauncher()
152 assertTrue(mUserManager.isQuietModeEnabled(mTargetUser)); in testTryEnableQuietMode_noCredentialRequest()
159 assertTrue(mUserManager.isQuietModeEnabled(mTargetUser)); in testTryEnableQuietMode_noCredentialRequest()
194 assertTrue(mUserManager.isQuietModeEnabled(mTargetUser)); in testTryEnableQuietMode()
204 assertFalse(mUserManager.isQuietModeEnabled(mTargetUser)); in testTryDisableQuietMode()
DLauncherAppsTests.java102 private UserManager mUserManager; field in LauncherAppsTests
116 mUserManager = mContext.getSystemService(UserManager.class); in setUp()
181 assertThat(profiles).containsExactlyElementsIn(mUserManager.getUserProfiles()); in testGetProfiles_fromMainProfile()
433 return mUserManager.getUserForSerialNumber(serialNo); in getUserHandleArgument()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DUserRestrictionsParentTest.java52 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()
DBaseDeviceAdminTest.java127 protected UserManager mUserManager; field in BaseDeviceAdminTest
139 mUserManager = mContext.getSystemService(UserManager.class); in setUp()
140 assertWithMessage("userManager").that(mUserManager).isNotNull(); in setUp()
192 boolean isUserUnlocked = mUserManager.isUserUnlocked(); in waitUntilUserUnlocked()
202 assertWithMessage("user unlocked").that(mUserManager.isUserUnlocked()).isTrue(); in waitUntilUserUnlocked()
DCustomizationRestrictionsTest.java115 assertTrue(mUserManager.hasUserRestriction(UserManager.DISALLOW_SET_WALLPAPER)); in testDisallowSetWallpaper_allowed()
141 assertFalse(mUserManager.hasUserRestriction(UserManager.DISALLOW_SET_WALLPAPER)); in testDisallowSetWallpaper_allowed()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/users/
DUserReference.java65 private final UserManager mUserManager; field in UserReference
76 mUserManager = TestApis.context().androidContextAsUser(this) in UserReference()
280 return mUserManager.isUserRunning(userHandle()); in isRunning()
294 return mUserManager.isUserUnlocked(userHandle()); in isUnlocked()
307 String userTypeName = mUserManager.getUserType(); in type()
346 UserHandle parentHandle = mUserManager.getProfileParent(userHandle()); in parent()
/cts/hostsidetests/shortcuts/deviceside/common/src/android/content/pm/cts/shortcut/device/common/
DShortcutManagerDeviceTestBase.java44 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/
DDeviceOwnerUserRestrictionsTest.java99 mUserManager.hasUserRestriction(r, userHandle)); in testHasBaseUserRestrictions()
105 mUserManager.hasUserRestriction(r, userHandle)); in testHasBaseUserRestrictions()
DBaseUserRestrictionsTest.java114 expected, mUserManager.hasUserRestriction(restriction)); in assertLayeredRestriction()
125 return ShellIdentityUtils.invokeMethodWithShellPermissions(mUserManager, in hasBaseUserRestriction()
147 final boolean hadRestriction = mUserManager.hasUserRestriction(restriction); in assertSetClearUserRestriction()
185 final boolean hadRestriction = mUserManager.hasUserRestriction(restriction); in assertCannotSetUserRestriction()
DProfileGlobalRestrictionsTest.java25 expected, mUserManager.hasUserRestriction(restriction)); in assertRestriction()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DVpnTestActivity.java57 private UserManager mUserManager; field in VpnTestActivity
71 mUserManager = (UserManager) getSystemService(Context.USER_SERVICE); in onCreate()
/cts/tests/app/AppExitTest/src/android/app/cts/
DActivityManagerAppExitInfoTest.java129 private UserManager mUserManager; field in ActivityManagerAppExitInfoTest
151 mUserManager = UserManager.get(mContext); in setUp()
154 mSupportMultipleUsers = mUserManager.supportsMultipleUsers(); in setUp()
1176 mUserManager::getUserInfo, in testSecondaryUser()