Home
last modified time | relevance | path

Searched refs:mPrimaryUserId (Results 1 – 25 of 43) sorted by relevance

12

/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DCrossProfileAppsPermissionHostSideTest.java78 installAppAsUser(TEST_WITH_REQUESTED_PERMISSION_APK, mPrimaryUserId); in testCanRequestInteractAcrossProfiles_fromPersonalProfile_returnsTrue()
86 mPrimaryUserId, in testCanRequestInteractAcrossProfiles_fromPersonalProfile_returnsTrue()
93 installAppAsUser(TEST_WITH_REQUESTED_PERMISSION_APK, mPrimaryUserId); in testCanRequestInteractAcrossProfiles_fromWorkProfile_returnsTrue()
108 installAppAsUser(TEST_WITH_REQUESTED_PERMISSION_APK, mPrimaryUserId); in testCanRequestInteractAcrossProfiles_noOtherProfiles_ReturnsFalse()
114 mPrimaryUserId, in testCanRequestInteractAcrossProfiles_noOtherProfiles_ReturnsFalse()
121 installAppAsUser(TEST_WITH_REQUESTED_PERMISSION_APK, mPrimaryUserId); in testCanRequestInteractAcrossProfiles_packageNotAllowed_returnsTrue()
128 mPrimaryUserId, in testCanRequestInteractAcrossProfiles_packageNotAllowed_returnsTrue()
135 installAppAsUser(TEST_WITH_REQUESTED_PERMISSION_APK, mPrimaryUserId); in testCanRequestInteractAcrossProfiles_packageNotInstalled_returnsTrue()
136 mProfileId = createManagedProfile(mPrimaryUserId); in testCanRequestInteractAcrossProfiles_packageNotInstalled_returnsTrue()
147 mPrimaryUserId, in testCanRequestInteractAcrossProfiles_packageNotInstalled_returnsTrue()
[all …]
DDeviceOwnerPlusProfileOwnerTest.java85 installAppAsUser(COMP_DPC_APK, mPrimaryUserId); in setUp()
86 if (!setDeviceOwner(COMP_DPC_ADMIN, mPrimaryUserId, /*expectFailure*/ false)) { in setUp()
87 removeAdmin(COMP_DPC_ADMIN, mPrimaryUserId); in setUp()
94 mPrimaryUserId); in setUp()
99 assertTrue("Failed to remove device owner.", removeAdmin(COMP_DPC_ADMIN, mPrimaryUserId)); in tearDown()
110 assertCannotCreateManagedProfile(mPrimaryUserId); in testCannotAddManagedProfileWithDeviceOwner()
148 installAppAsUser(COMP_DPC_APK2, mPrimaryUserId); in testBindDeviceAdminServiceAsUser_secondaryUser()
175 assertCannotCreateManagedProfile(mPrimaryUserId); in testCannotAddProfileIfRestrictionSet()
221 mPrimaryUserId); in testNetworkAndSecurityLoggingAvailableIfAffiliated()
228 mPrimaryUserId); in testNetworkAndSecurityLoggingAvailableIfAffiliated()
[all …]
DCrossProfileAppsHostSideTest.java62 installRequiredApps(mPrimaryUserId); in setUp()
87 verifyCrossProfileAppsApi(mPrimaryUserId, mPrimaryUserId, NON_TARGET_USER_TEST_CLASS); in testPrimaryUserToPrimaryUser()
97 verifyCrossProfileAppsApi(mPrimaryUserId, mProfileId, TARGET_USER_TEST_CLASS); in testPrimaryUserToManagedProfile()
106 verifyCrossProfileAppsApi(mProfileId, mPrimaryUserId, TARGET_USER_TEST_CLASS); in testManagedProfileToPrimaryUser()
115 …verifyCrossProfileAppsApi(mProfileId, mPrimaryUserId, START_ACTIVITY_TEST_CLASS, "testCanStartMain… in testStartActivityComponent()
116 …verifyCrossProfileAppsApi(mProfileId, mPrimaryUserId, START_ACTIVITY_TEST_CLASS, "testCanStartNonM… in testStartActivityComponent()
117 …verifyCrossProfileAppsApi(mProfileId, mPrimaryUserId, START_ACTIVITY_TEST_CLASS, "testCannotStartN… in testStartActivityComponent()
118 …verifyCrossProfileAppsApi(mProfileId, mPrimaryUserId, START_ACTIVITY_TEST_CLASS, "testCannotStartA… in testStartActivityComponent()
127 …verifyCrossProfileAppsApi(mProfileId, mPrimaryUserId, START_ACTIVITY_TEST_CLASS, "testCannotStartA… in testStartActivityIntent()
128 …verifyCrossProfileAppsApi(mProfileId, mPrimaryUserId, START_ACTIVITY_TEST_CLASS, "testCanStartMain… in testStartActivityIntent()
[all …]
DOrgOwnedProfileOwnerTest.java86 mUserId = createManagedProfile(mPrimaryUserId); in createManagedProfile()
87 switchUser(mPrimaryUserId); in createManagedProfile()
122 installAppAsUser(DEVICE_ADMIN_APK, mPrimaryUserId); in testCanRelinquishControlOverDevice()
124 mPrimaryUserId, /*expectFailure*/false)); in testCanRelinquishControlOverDevice()
126 mPrimaryUserId); in testCanRelinquishControlOverDevice()
128 removeAdmin(DEVICE_ADMIN_COMPONENT_FLATTENED, mPrimaryUserId); in testCanRelinquishControlOverDevice()
169 installAppAsUser(DEVICE_ADMIN_APK, mPrimaryUserId); in testUserRestrictionsSetOnParentAreNotPersisted()
173 "testHasUserRestrictionDisallowConfigDateTime", mPrimaryUserId); in testUserRestrictionsSetOnParentAreNotPersisted()
179 "testUserRestrictionDisallowConfigDateTimeIsNotPersisted", mPrimaryUserId); in testUserRestrictionsSetOnParentAreNotPersisted()
196 installAppAsUser(DEVICE_ADMIN_APK, mPrimaryUserId); in testCameraDisabledOnParentIsEnforced()
[all …]
DQuietModeHostsideTest.java56 installAppAsUser(TEST_APK, mPrimaryUserId); in setUp()
57 installAppAsUser(TEST_LAUNCHER_APK, mPrimaryUserId); in setUp()
84 mPrimaryUserId); in testQuietMode_defaultForegroundLauncher()
90 mPrimaryUserId, in testQuietMode_defaultForegroundLauncher()
94 mPrimaryUserId); in testQuietMode_defaultForegroundLauncher()
105 mPrimaryUserId, in testQuietMode_notForegroundLauncher()
116 mPrimaryUserId, in testQuietMode_notDefaultLauncher()
144 mPrimaryUserId, in checkBroadcastManagedProfileAvailable()
155 mPrimaryUserId, in checkBroadcastManagedProfileAvailable()
210 mPrimaryUserId, in testQuietMode_noCredentialRequest()
[all …]
DLauncherAppsMultiUserTest.java46 installTestApps(mPrimaryUserId); in setUp()
63 installAppAsUser(SIMPLE_APP_APK, mPrimaryUserId); in testGetActivitiesForNonProfileFails()
67 mPrimaryUserId, in testGetActivitiesForNonProfileFails()
73 startCallbackService(mPrimaryUserId); in testNoLauncherCallbackPackageAddedSecondaryUser()
74 installAppAsUser(SIMPLE_APP_APK, mPrimaryUserId); in testNoLauncherCallbackPackageAddedSecondaryUser()
78 mPrimaryUserId, in testNoLauncherCallbackPackageAddedSecondaryUser()
DManagedProfileTest.java423 "testBluetoothSharingAvailable", mPrimaryUserId); in testBluetoothSharingRestriction()
454 "testIsManagedProfileReturnsFalse", mPrimaryUserId); in userManagerIsManagedProfileReturnsCorrectValues()
467 mPrimaryUserId, params); in testCanGetWorkShortcutIconDrawableFromPersonalProfile()
478 "addDynamicShortcuts", mPrimaryUserId); in testCanGetPersonalShortcutIconDrawableFromWorkProfile()
481 params.put("otherProfileUserId", String.valueOf(mPrimaryUserId)); in testCanGetPersonalShortcutIconDrawableFromWorkProfile()
490 "removeAllDynamicShortcuts", mPrimaryUserId); in testCanGetPersonalShortcutIconDrawableFromWorkProfile()
498 "testGetAllProfiles", mPrimaryUserId); in testCanGetProfiles()
504 "testIsProfileReturnsFalse_runAsPrimary", mPrimaryUserId); in testCanGetProfiles()
517 "testCreateProfile_managedProfile", mPrimaryUserId); in testCanCreateProfile()
523 installAppAsUser(SHARING_APP_1_APK, mPrimaryUserId); in testResolverActivityLaunchedFromPersonalProfileWithSelectedWorkTab()
[all …]
DDeviceOwnerTest.java459 installAppAsUser(WIFI_CONFIG_CREATOR_APK, mPrimaryUserId); in testWifiConfigLockdown()
483 DEVICE_OWNER_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mPrimaryUserId, in testCannotSetDeviceOwnerAgain()
488 installAppAsUser(MANAGED_PROFILE_APK, mPrimaryUserId); in testCannotSetDeviceOwnerAgain()
490 MANAGED_PROFILE_PKG + "/" + MANAGED_PROFILE_ADMIN, mPrimaryUserId, in testCannotSetDeviceOwnerAgain()
494 removeAdmin(MANAGED_PROFILE_PKG + "/" + MANAGED_PROFILE_ADMIN, mPrimaryUserId); in testCannotSetDeviceOwnerAgain()
609 changeUserRestrictionOrFail("no_factory_reset", true, mPrimaryUserId, DEVICE_OWNER_PKG); in testDisallowFactoryReset()
655 "testPackageInstall", mPrimaryUserId); in testPackageInstallCache()
658 "testKeepPackageCache", mPrimaryUserId); in testPackageInstallCache()
667 "testPackageUninstall", mPrimaryUserId); in testPackageInstallCache()
672 "testInstallExistingPackage", mPrimaryUserId); in testPackageInstallCache()
[all …]
DManagedProfilePasswordTest.java134 changeUserCredential(TEST_PASSWORD, /* oldCredential= */ null, mPrimaryUserId); in testUnlockWorkProfile_deviceWidePassword()
138 verifyUserCredential(TEST_PASSWORD, mPrimaryUserId); in testUnlockWorkProfile_deviceWidePassword()
145 changeUserCredential(/* newCredential= */ null, TEST_PASSWORD, mPrimaryUserId); in testUnlockWorkProfile_deviceWidePassword()
158 changeUserCredential(TEST_PASSWORD, /* oldCredential= */ null, mPrimaryUserId); in testRebootDevice_unifiedPassword()
161 verifyUserCredential(TEST_PASSWORD, mPrimaryUserId); in testRebootDevice_unifiedPassword()
166 changeUserCredential(/* newCredential= */ null, TEST_PASSWORD, mPrimaryUserId); in testRebootDevice_unifiedPassword()
186 changeUserCredential(primaryPassword, /* oldCredential= */ null, mPrimaryUserId); in testRebootDevice_separatePasswords()
190 verifyUserCredential(primaryPassword, mPrimaryUserId); in testRebootDevice_separatePasswords()
196 changeUserCredential(/* newCredential= */ null, primaryPassword, mPrimaryUserId); in testRebootDevice_separatePasswords()
DCustomManagedProfileTest.java38 installAppAsUser(MANAGED_PROFILE_APK, mPrimaryUserId); in testIsProvisioningAllowed()
43 assertIsProvisioningAllowed(true, mPrimaryUserId); in testIsProvisioningAllowed()
46 assertIsProvisioningAllowed(false, mPrimaryUserId); in testIsProvisioningAllowed()
DUserRestrictionsTest.java65 boolean removed = removeAdmin(componentName, mPrimaryUserId); in tearDown()
67 CLog.e("Failed to remove %s on user %d", componentName, mPrimaryUserId); in tearDown()
165 secondaryUserId = mPrimaryUserId; in testUserRestrictions_layering()
235 secondaryUserId = mPrimaryUserId; in testUserRestrictions_profileGlobalRestrictionsAsDo()
292 affiliateUsers(DEVICE_ADMIN_PKG, mDeviceOwnerUserId, mPrimaryUserId); in setDo()
DBaseDeviceOwnerTest.java55 affiliateUsers(DEVICE_OWNER_PKG, mDeviceOwnerUserId, mPrimaryUserId); in setUp()
78 executeDeviceOwnerTestOnSpecificUser(testClassName, mPrimaryUserId); in executeDeviceOwnerTest()
99 executeDeviceOwnerPackageTestMethod(className, testName, mPrimaryUserId); in executeDeviceTestMethod()
DCustomDeviceOwnerTest.java103 installAppAsUser(ACCOUNT_MANAGEMENT_APK, mPrimaryUserId); in testCannotSetDeviceOwnerWhenAccountPresent()
107 "testAddAccountExplicitly", mPrimaryUserId); in testCannotSetDeviceOwnerWhenAccountPresent()
114 "testRemoveAccountExplicitly", mPrimaryUserId); in testCannotSetDeviceOwnerWhenAccountPresent()
DLauncherAppsProfileTest.java54 mParentUserId = mPrimaryUserId; in setUp()
137 startCallbackService(mPrimaryUserId); in testLauncherCallbackPackageAddedProfile()
149 startCallbackService(mPrimaryUserId); in testLauncherCallbackPackageRemovedProfile()
161 startCallbackService(mPrimaryUserId); in testLauncherCallbackPackageChangedProfile()
DDeviceAndProfileOwnerHostSideTransferTest.java44 final boolean hasManagedProfile = (mUserId != mPrimaryUserId); in testTransferOwnership()
156 final int userId = createManagedProfile(mPrimaryUserId); in setupManagedProfile()
186 "testSetAffiliationId1", mPrimaryUserId); in setSameAffiliationId()
196 "testIsAffiliationId1", mPrimaryUserId); in assertAffiliationIdsAreIntact()
DMixedManagedProfileOwnerTest.java57 mParentUserId = mPrimaryUserId; in setUp()
117 mPrimaryUserId); in testScreenCaptureDisabled_assist_allowedPrimaryUser()
384 installAppAsUser(DEVICE_ADMIN_APK, mPrimaryUserId); in testNetworkLogging()
391 installAppAsUser(DEVICE_ADMIN_APK, mPrimaryUserId); in testNetworkLoggingDelegate()
420 "testConnectToWebsites_shouldNotBeLogged", mPrimaryUserId); in testNetworkLoggingOnWorkProfile()
DManagedProfileProvisioningSingleAdminTest.java47 installAppAsUser(SINGLE_ADMIN_APP_APK, mPrimaryUserId); in setUp()
66 "testManagedProfileProvisioning", mPrimaryUserId); in testEXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME()
/cts/hostsidetests/appsearch/src/android/appsearch/cts/
DAppSearchPackageTest.java41 private int mPrimaryUserId; field in AppSearchPackageTest
45 mPrimaryUserId = getDevice().getPrimaryUserId(); in setUp()
46 installPackageAsUser(TARGET_APK_A, /* grantPermission= */true, mPrimaryUserId); in setUp()
47 installPackageAsUser(TARGET_APK_B, /* grantPermission= */true, mPrimaryUserId); in setUp()
48 runDeviceTestAsUserInPkgA("clearTestData", mPrimaryUserId); in setUp()
60 runDeviceTestAsUserInPkgA("testPutDocuments", mPrimaryUserId); in testPackageRemove()
62 runDeviceTestAsUserInPkgB("testGlobalGetDocuments_exist", mPrimaryUserId); in testPackageRemove()
66 runDeviceTestAsUserInPkgB("testGlobalGetDocuments_nonexist", mPrimaryUserId); in testPackageRemove()
71 runDeviceTestAsUserInPkgA("testPutDocuments", mPrimaryUserId); in testPackageUninstall_immediatelyReboot()
72 runDeviceTestAsUserInPkgA("closeAndFlush", mPrimaryUserId); in testPackageUninstall_immediatelyReboot()
[all …]
DAppSearchInstantAppTest.java53 private int mPrimaryUserId; field in AppSearchInstantAppTest
64 mPrimaryUserId = getDevice().getPrimaryUserId(); in setUp()
66 installPackageAsUser(TARGET_APK_A, /* grantPermission= */true, mPrimaryUserId, "--instant"); in setUp()
76 runDeviceTestAsUserInPkgA("testInstantAppDoesntHaveAccess", mPrimaryUserId); in testInstantAppDoesntHaveAccess()
/cts/hostsidetests/blobstore/src/com/android/cts/host/blob/
DBlobStoreMultiUserTest.java38 private static int mPrimaryUserId; field in BlobStoreMultiUserTest
46 mPrimaryUserId = testInfo.getDevice().getPrimaryUserId(); in setUpClass()
54 installPackageAsUser(apk, true /* grantPermissions */, mPrimaryUserId, "-t"); in setUp()
59 installPackageAsUser(TARGET_APK_ASSIST, false /* grantPermissions */, mPrimaryUserId); in setUp()
74 mPrimaryUserId); in testCreateAndOpenSession()
78 mPrimaryUserId); in testCreateAndOpenSession()
89 mPrimaryUserId); in testCommitAndOpenBlob()
93 mPrimaryUserId); in testCommitAndOpenBlob()
104 mPrimaryUserId); in testBlobAccessAcrossUsers_withTestOnlyApp()
108 mPrimaryUserId); in testBlobAccessAcrossUsers_withTestOnlyApp()
[all …]
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DPackageVisibilityTest.java58 installTestAppForUser(TEST_APK, mPrimaryUserId); in setUpPackage()
88 installTestAppForUser(TEST_APK, mPrimaryUserId); in testUninstalledPackageVisibility()
90 installTestAppForUser(TINY_APK, mPrimaryUserId); in testUninstalledPackageVisibility()
93 assertTrue(isAppVisibleForUser(TINY_PKG, mPrimaryUserId, MATCH_NORMAL)); in testUninstalledPackageVisibility()
94 assertTrue(isAppVisibleForUser(TINY_PKG, mPrimaryUserId, MATCH_UNINSTALLED)); in testUninstalledPackageVisibility()
98 ".PackageAccessTest", "testPackageAccess_inUser", mPrimaryUserId); in testUninstalledPackageVisibility() local
100 ".PackageAccessTest", "testPackageAccess_inUserUninstalled", mPrimaryUserId); in testUninstalledPackageVisibility() local
125 assertFalse(isAppVisibleForUser(TINY_PKG, mPrimaryUserId, MATCH_NORMAL)); in testUninstalledPackageVisibility()
126 assertFalse(isAppVisibleForUser(TINY_PKG, mPrimaryUserId, MATCH_UNINSTALLED)); in testUninstalledPackageVisibility()
145 mPrimaryUserId); in testUninstalledPackageVisibility() local
[all …]
DInstantAppUserTest.java63 private int mPrimaryUserId; field in InstantAppUserTest
75 mPrimaryUserId = getDevice().getPrimaryUserId(); in setUp()
172 runDeviceTestsAsUser(USER_TEST_PKG, TEST_CLASS, "testQueryInstant", mPrimaryUserId); in testInstallInstant()
182 runDeviceTestsAsUser(USER_TEST_PKG, TEST_CLASS, "testQueryFull", mPrimaryUserId); in testInstallFull()
191 installAppAsUser(USER_APK, mPrimaryUserId); in testInstallMultiple()
193 runDeviceTestsAsUser(USER_TEST_PKG, TEST_CLASS, "testQueryFull", mPrimaryUserId); in testInstallMultiple()
203 runDeviceTestsAsUser(USER_TEST_PKG, TEST_CLASS, "testQueryInstant", mPrimaryUserId); in testUpgradeExisting()
207 runDeviceTestsAsUser(USER_TEST_PKG, TEST_CLASS, "testQueryInstant", mPrimaryUserId); in testUpgradeExisting()
217 runDeviceTestsAsUser(USER_TEST_PKG, TEST_CLASS, "testQueryInstant", mPrimaryUserId); in testReplaceExisting()
221 runDeviceTestsAsUser(USER_TEST_PKG, TEST_CLASS, "testQueryInstant", mPrimaryUserId); in testReplaceExisting()
DBaseAppSecurityTest.java36 protected int mPrimaryUserId; field in BaseAppSecurityTest
45 mPrimaryUserId = getDevice().getPrimaryUserId(); in setUpBaseAppSecurityTest()
47 mFixedUsers.add(mPrimaryUserId); in setUpBaseAppSecurityTest()
48 if (mPrimaryUserId != Utils.USER_SYSTEM) { in setUpBaseAppSecurityTest()
59 userId = mPrimaryUserId; in installTestAppForUser()
DPackageSetInstallerTest.kt128 .forUser(mPrimaryUserId) in runTest()
139 .forUser(mPrimaryUserId) in runTest()
151 "setTargetInstallerPackage", mPrimaryUserId, in runTest()
167 "removeWhitelistRestrictedPermission", mPrimaryUserId, whitelistArgs) in runTest()
181 "setSelfAsInstallerAndWhitelistPermission", mPrimaryUserId, in runTest()
243 .dropWhile { !it.trim().startsWith("User $mPrimaryUserId:") } // Find user in <lambda>()
/cts/hostsidetests/content/src/android/content/cts/
DBaseContextCrossProfileTest.java46 protected int mPrimaryUserId; field in BaseContextCrossProfileTest
57 mPrimaryUserId = getDevice().getPrimaryUserId(); in setUp()
67 mFixedUsers.add(mPrimaryUserId); in setFixedUsers()
74 if (mPrimaryUserId != USER_SYSTEM) { in setFixedUsers()
78 if (getDevice().getCurrentUser() != mPrimaryUserId) { in setFixedUsers()

12