Home
last modified time | relevance | path

Searched refs:mUserId (Results 1 – 25 of 38) sorted by relevance

12

/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DOrgOwnedProfileOwnerTest.java76 protected int mUserId; field in OrgOwnedProfileOwnerTest
92 mUserId = createManagedProfile(mPrimaryUserId); in createManagedProfile()
94 startUserAndWait(mUserId); in createManagedProfile()
96 installAppAsUser(DEVICE_ADMIN_APK, mUserId); in createManagedProfile()
97 setProfileOwnerOrFail(DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId); in createManagedProfile()
98 startUserAndWait(mUserId); in createManagedProfile()
111 mUserId, DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS)); in restrictManagedProfileRemoval()
117 mUserId); in testCanRelinquishControlOverDevice()
120 assertHasNoUser(mUserId); in testCanRelinquishControlOverDevice()
136 runDeviceTestsAsUser(DEVICE_ADMIN_PKG, ".LockScreenInfoTest", mUserId); in testLockScreenInfo()
[all …]
DDeviceAdminServiceProfileOwnerTest.java26 private int mUserId; field in DeviceAdminServiceProfileOwnerTest
30 return mUserId; in getUserId()
39 mUserId = createUser(); in setUp()
44 CLog.i("Installing %s on user %d...", apk, mUserId); in installOwnerApp()
45 installAppAsUser(apk, mUserId); in installOwnerApp()
50 CLog.i("Removing admin %s from user %d...", component, mUserId); in removeAdmin()
51 removeAdmin(component, mUserId); in removeAdmin()
56 setProfileOwnerOrFail(component, mUserId); in setAsOwnerOrFail()
DProfileOwnerTest.java37 private int mUserId = 0; field in ProfileOwnerTest
43 mUserId = isHeadlessSystemUserMode() ? getCurrentUser() : getMainUser(); in setUp()
46 installAppAsUser(PROFILE_OWNER_APK, mUserId); in setUp()
48 PROFILE_OWNER_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId, in setUp()
50 removeAdmin(PROFILE_OWNER_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId); in setUp()
80 removeAdmin(PROFILE_OWNER_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId)); in tearDown()
88 CLog.d("executeProfileOwnerTest(): running %s on user %d", testClassName, mUserId); in executeProfileOwnerTest()
89 runDeviceTestsAsUser(PROFILE_OWNER_PKG, testClass, mUserId); in executeProfileOwnerTest()
95 mUserId); in executeProfileOwnerTestMethod()
96 runDeviceTestsAsUser(PROFILE_OWNER_PKG, className, testName, mUserId); in executeProfileOwnerTestMethod()
DProfileOwnerTestApi23.java32 private int mUserId; field in ProfileOwnerTestApi23
38 mUserId = USER_OWNER; in setUp()
40 installAppAsUser(DEVICE_ADMIN_APK, mUserId); in setUp()
42 DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId, in setUp()
44 removeAdmin(DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId); in setUp()
53 removeAdmin(DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId)); in tearDown()
62 ".DelegatedCertInstallerTest", "testSetNotExistCertInstallerPackage", mUserId); in testDelegatedCertInstaller()
DMixedManagedProfileOwnerTest.java58 mUserId = createManagedProfile(mParentUserId); in createManagedProfile()
60 startUserAndWait(mUserId); in createManagedProfile()
62 installAppAsUser(DEVICE_ADMIN_APK, mUserId); in createManagedProfile()
63 setProfileOwnerOrFail(DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId); in createManagedProfile()
64 startUserAndWait(mUserId); in createManagedProfile()
69 removeUser(mUserId); in tearDown()
193 runDeviceTestsAsUser(DEVICE_ADMIN_PKG, CLEAR_PROFILE_OWNER_NEGATIVE_TEST_CLASS, mUserId); in testCannotClearProfileOwner()
201 "testGenerateKeyPairWithDeviceIdAttestationExpectingFailure", mUserId); in testDelegatedCertInstallerDeviceIdAttestation()
211 "testFailsWithoutProfileOwnerIdsGrant", mUserId); in testDeviceIdAttestationForProfileOwner()
308 installAppAsUser(DELEGATE_APP_APK, mUserId); in testNetworkLoggingDelegate()
[all …]
DDeviceAndProfileOwnerHostSideTransferTest.java36 protected int mUserId; field in DeviceAndProfileOwnerHostSideTransferTest
42 final boolean hasManagedProfile = (mUserId != mPrimaryUserId); in testTransferOwnership()
46 "testTransferOwnership", mUserId); in testTransferOwnership()
57 "testTransferSameAdmin", mUserId); in testTransferSameAdmin()
64 "testTransferOwnershipChangedBroadcast", mUserId); in testTransferOwnershipChangedBroadcast()
71 "testTransferOwnership", mUserId); in testTransferCompleteCallback()
77 "testTransferCompleteCallbackIsCalled", mUserId); in testTransferCompleteCallback()
82 mUserId = userId; in setupTestParameters()
91 "testTransferOwnershipNoMetadata", mUserId); in testTransferOwnershipNoMetadata()
98 "testIsBundleNullNoTransfer", mUserId); in testIsBundleNullNoTransfer()
DMixedManagedProfileOwnerTestApi30.java44 mUserId = createManagedProfile(mParentUserId); in createManagedProfile()
46 startUserAndWait(mUserId); in createManagedProfile()
48 installAppAsUser(DEVICE_ADMIN_APK, mUserId); in createManagedProfile()
49 setProfileOwnerOrFail(DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId); in createManagedProfile()
50 startUserAndWait(mUserId); in createManagedProfile()
55 removeUser(mUserId); in tearDown()
DDeviceAndProfileOwnerTest.java168 protected int mUserId; field in DeviceAndProfileOwnerTest
201 installAppAsUser(DELEGATE_APP_APK, mUserId); in testApplicationRestrictionIsRestricted()
203 "testAssertCallerIsNotApplicationRestrictionsManagingPackage", mUserId); in testApplicationRestrictionIsRestricted()
205 "testSetApplicationRestrictionsManagingPackageToDelegate", mUserId); in testApplicationRestrictionIsRestricted()
207 "testAssertCallerIsApplicationRestrictionsManagingPackage", mUserId); in testApplicationRestrictionIsRestricted()
211 installAppAsUser(DELEGATE_APP_APK, mUserId); in installDelegateApp()
216 installAppAsUser(CERT_INSTALLER_APK, mUserId); in testDelegationCertSelection()
221 runDeviceTestsAsUser(CERT_INSTALLER_PKG, ".CertSelectionDelegateTest", mUserId); in testDelegationCertSelection()
246 return mUserId; in getUserIdForAlwaysOnVpnTests()
424 installAppAsUser(SIMPLE_PRE_M_APP_APK, mUserId); in testPermissionGrantPreMApp()
[all …]
DMixedManagedProfileOwnerTestApi25.java45 mUserId = createManagedProfile(mParentUserId); in createManagedProfile()
47 startUserAndWait(mUserId); in createManagedProfile()
49 installAppAsUser(DEVICE_ADMIN_APK, mUserId); in createManagedProfile()
50 setProfileOwnerOrFail(DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId); in createManagedProfile()
51 startUserAndWait(mUserId); in createManagedProfile()
56 removeUser(mUserId); in tearDown()
DMixedProfileOwnerTestApi25.java35 mUserId = mPrimaryUserId; in setUp()
37 installAppAsUser(DEVICE_ADMIN_APK, mUserId); in setUp()
39 DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId, in setUp()
41 removeAdmin(DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId); in setUp()
50 removeAdmin(DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId)); in tearDown()
DMixedProfileOwnerTest.java42 mUserId = mPrimaryUserId; in setUp()
45 + "mDeviceOwnerUserId=%d", getClass(), mUserId, mPrimaryUserId, mInitialUserId, in setUp()
48 installAppAsUser(DEVICE_ADMIN_APK, mUserId); in setUp()
50 DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId, in setUp()
52 removeAdmin(DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId); in setUp()
61 removeAdmin(DEVICE_ADMIN_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId)); in tearDown()
DBaseDeviceAdminHostSideTest.java34 protected int mUserId; field in BaseDeviceAdminHostSideTest
58 mUserId = mPrimaryUserId; in setUp()
60 installAppAsUser(getDeviceAdminApkFileName(), mUserId); in setUp() local
61 setDeviceAdmin(getAdminReceiverComponent(), mUserId); in setUp() local
66 assertTrue("Failed to remove admin", removeAdmin(getAdminReceiverComponent(), mUserId)); in tearDown()
75 DeviceAdminHelper.getDeviceAdminJavaPackage() + "." + className, method, mUserId); in runTests()
DDeviceAndProfileOwnerTestApi30.java31 protected int mUserId; field in DeviceAndProfileOwnerTestApi30
46 runDeviceTestsAsUser(DEVICE_ADMIN_PKG, className, mUserId); in executeDeviceTestClass()
50 runDeviceTestsAsUser(DEVICE_ADMIN_PKG, className, testName, mUserId); in executeDeviceTestMethod()
DDeviceAndProfileOwnerTestApi25.java37 protected int mUserId; field in DeviceAndProfileOwnerTestApi25
56 installAppAsUser(SIMPLE_PRE_M_APP_APK, mUserId); in testPermissionGrantPreMApp()
61 runDeviceTestsAsUser(DEVICE_ADMIN_PKG, className, testName, mUserId); in executeDeviceTestMethod()
DDeviceAdminHostSideTestApi24.java34 installAppAsUser(getDeviceAdminApkFileName(), mUserId); in testAdminWithNoProtection() local
35 setDeviceAdminExpectingFailure(getUnprotectedAdminReceiverComponent(), mUserId, in testAdminWithNoProtection() local
DDeviceAdminHostSideTestApi23.java37 installAppAsUser(getDeviceAdminApkFileName(), mUserId); in testAdminWithNoProtection() local
39 setDeviceAdmin(getUnprotectedAdminReceiverComponent(), mUserId); in testAdminWithNoProtection() local
/cts/hostsidetests/packagemanager/multiuser/src/com/android/tests/packagemanager/multiuser/host/
DUninstallExistingPackageTest.java44 installPackageAsUser(EMPTY_TEST_APP_APK, true, mUserId); in setUp()
45 assertTrue(isPackageInstalledForUser(EMPTY_TEST_APP_PKG, mUserId)); in setUp()
56 assertTrue("Package is not installed for user " + mUserId, in testUninstallExistingPackage_succeedsIfInstalledInAnotherUser()
57 isPackageInstalledForUser(EMPTY_TEST_APP_PKG, mUserId)); in testUninstallExistingPackage_succeedsIfInstalledInAnotherUser()
62 runDeviceTestAsUser("testUninstallExistingPackage", mUserId, in testUninstallExistingPackage_succeedsIfInstalledInAnotherUser()
64 assertFalse(isPackageInstalledForUser(EMPTY_TEST_APP_PKG, mUserId)); in testUninstallExistingPackage_succeedsIfInstalledInAnotherUser()
75 assertTrue(isPackageInstalledForUser(EMPTY_TEST_APP_PKG, mUserId)); in testUninstallExistingPackage_failsIfInstalledInOnlyOneUser()
79 runDeviceTestAsUser("testUninstallExistingPackage", mUserId, in testUninstallExistingPackage_failsIfInstalledInOnlyOneUser()
81 assertTrue(isPackageInstalledForUser(EMPTY_TEST_APP_PKG, mUserId)); in testUninstallExistingPackage_failsIfInstalledInOnlyOneUser()
/cts/hostsidetests/webkit/src/com/android/cts/webkit/
DWebViewHostSideMultipleProfileTest.java59 private int mUserId = -1; field in WebViewHostSideMultipleProfileTest
70 if (mUserId > 0) { in tearDown()
72 stopAndRemoveUser(mUserId); in tearDown()
80 mUserId = createUser(SECONDARY_USER_NAME + System.currentTimeMillis(), false); in testSecondaryUser()
81 startUser(mUserId); in testSecondaryUser()
82 switchUser(mUserId); in testSecondaryUser()
83 installTestApkForUser(mUserId); in testSecondaryUser()
85 assertWebViewDeviceTestAsUserPasses(this, "testCreateWebViewAndNavigate", mUserId); in testSecondaryUser()
92 mUserId = createUser(SECONDARY_USER_NAME + System.currentTimeMillis(), true); in testManagedProfile()
93 startUser(mUserId); in testManagedProfile()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DAutofillRestrictionsTest.java38 int mUserId; field in AutofillRestrictionsTest
44 mUserId = getInstrumentation().getContext().getUserId(); in setUp()
87 mUserId, USER_SETUP_COMPLETE, 1); in enableService()
93 mUserId, AUTOFILL_SERVICE, SERVICE_NAME); in enableService()
102 runShellCommand("settings delete --user %d secure %s", mUserId, AUTOFILL_SERVICE); in disableService()
113 actual = runShellCommand("settings get --user %d secure %s", mUserId, in waitForServiceSettingSaved()
121 fail("Expected service status for user " + mUserId + ": " + expected in waitForServiceSettingSaved()
DContentCaptureRestrictionsTest.java37 int mUserId; field in ContentCaptureRestrictionsTest
43 mUserId = getInstrumentation().getContext().getUserId(); in setUp()
75 mUserId, USER_SETUP_COMPLETE, 1); in enableService()
77 runShellCommand("cmd content_capture set temporary-service %d %s %d", mUserId, in enableService()
85 runShellCommand("cmd content_capture set temporary-service %d", mUserId); in disableService()
/cts/hostsidetests/backup/ProfileKeyValueApp/src/android.cts.backup.profilekeyvalueapp/
DProfileKeyValueBackupRestoreTest.java41 private int mUserId; field in ProfileKeyValueBackupRestoreTest
47 mUserId = context.getUserId(); in setUp()
60 editor.putInt(PREFS_USER_KEY, mUserId); in writeSharedPrefsAndAssertSuccess()
67 assertThat(userIdPref).isEqualTo(mUserId); in assertSharedPrefsRestored()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DAffiliationTest.java48 private @UserIdInt int mUserId; field in AffiliationTest
53 mUserId = context.getUserId(); in setUp()
56 Log.d(TAG, "setUp(): userId=" + mUserId + ", admin=" + mAdminComponent); in setUp()
93 Log.d(TAG, "setAffiliationIds(" + ids + ") on user " + mUserId); in setAffiliationIds()
97 assertWithMessage("affiliationIds on user %s", mUserId).that(setIds) in setAffiliationIds()
/cts/tests/app/src/android/app/cts/android/app/cts/tools/
DServiceProcessController.java53 final int mUserId; field in ServiceProcessController
94 mUserId = UserHandle.getUserId(mUid); in ServiceProcessController()
111 String cmd = "appops set --user " + mUserId + " " in denyBackgroundOp()
121 String cmd = "appops set --user " + mUserId + " " in allowBackgroundOp()
128 String cmd = "appops set --user " + mUserId + " " in denyAnyInBackgroundOp()
134 String cmd = "appops set --user " + mUserId + " " in allowAnyInBackgroundOp()
155 String cmd = "cmd deviceidle tempwhitelist -u " + mUserId in tempWhitelist()
161 String cmd = "cmd deviceidle tempwhitelist -u " + mUserId in removeFromTempWhitelist()
167 String cmd = "cmd appops set --user " + mUserId + " " in setAppOpMode()
/cts/hostsidetests/biometrics/app/src/android/server/biometrics/cts/app/
DBiometricsAtomsHostSideTests.java73 private int mUserId; field in BiometricsAtomsHostSideTests
84 mUserId = mInstrumentation.getContext().getUserId(); in setup()
140 session.startEnroll(mUserId); in testEnroll()
144 session.notifyAcquired(mUserId, code); in testEnroll()
148 session.finishEnroll(mUserId); in testEnroll()
161 session.startEnroll(mUserId); in testAuthenticateWithBiometricPrompt()
163 session.finishEnroll(mUserId); in testAuthenticateWithBiometricPrompt()
183 session.notifyAcquired(mUserId, code); in testAuthenticateWithBiometricPrompt()
187 session.acceptAuthentication(mUserId); in testAuthenticateWithBiometricPrompt()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DUserSettings.java44 private final int mUserId; field in UserSettings
112 mUserId = userId; in UserSettings()
159 runShellCommand("settings put --user %d %s %s %s%s", mUserId, mNamespace.get(), key, in set()
188 runShellCommand("settings delete --user %d %s %s", mUserId, mNamespace.get(), key); in delete()
195 String value = runShellCommand("settings get --user %d %s %s", mUserId, mNamespace.get(), in get()
212 return "namespace=" + mNamespace + ", user=" + mUserId; in toShortString()

12