/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ |
D | CrossProfileAppsPermissionHostSideTest.java | 78 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 …]
|
D | DeviceOwnerPlusProfileOwnerTest.java | 85 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 …]
|
D | CrossProfileAppsHostSideTest.java | 62 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 …]
|
D | OrgOwnedProfileOwnerTest.java | 86 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 …]
|
D | QuietModeHostsideTest.java | 56 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 …]
|
D | LauncherAppsMultiUserTest.java | 46 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()
|
D | ManagedProfileTest.java | 423 "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 …]
|
D | DeviceOwnerTest.java | 459 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 …]
|
D | ManagedProfilePasswordTest.java | 134 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()
|
D | CustomManagedProfileTest.java | 38 installAppAsUser(MANAGED_PROFILE_APK, mPrimaryUserId); in testIsProvisioningAllowed() 43 assertIsProvisioningAllowed(true, mPrimaryUserId); in testIsProvisioningAllowed() 46 assertIsProvisioningAllowed(false, mPrimaryUserId); in testIsProvisioningAllowed()
|
D | UserRestrictionsTest.java | 65 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()
|
D | BaseDeviceOwnerTest.java | 55 affiliateUsers(DEVICE_OWNER_PKG, mDeviceOwnerUserId, mPrimaryUserId); in setUp() 78 executeDeviceOwnerTestOnSpecificUser(testClassName, mPrimaryUserId); in executeDeviceOwnerTest() 99 executeDeviceOwnerPackageTestMethod(className, testName, mPrimaryUserId); in executeDeviceTestMethod()
|
D | CustomDeviceOwnerTest.java | 103 installAppAsUser(ACCOUNT_MANAGEMENT_APK, mPrimaryUserId); in testCannotSetDeviceOwnerWhenAccountPresent() 107 "testAddAccountExplicitly", mPrimaryUserId); in testCannotSetDeviceOwnerWhenAccountPresent() 114 "testRemoveAccountExplicitly", mPrimaryUserId); in testCannotSetDeviceOwnerWhenAccountPresent()
|
D | LauncherAppsProfileTest.java | 54 mParentUserId = mPrimaryUserId; in setUp() 137 startCallbackService(mPrimaryUserId); in testLauncherCallbackPackageAddedProfile() 149 startCallbackService(mPrimaryUserId); in testLauncherCallbackPackageRemovedProfile() 161 startCallbackService(mPrimaryUserId); in testLauncherCallbackPackageChangedProfile()
|
D | DeviceAndProfileOwnerHostSideTransferTest.java | 44 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()
|
D | MixedManagedProfileOwnerTest.java | 57 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()
|
D | ManagedProfileProvisioningSingleAdminTest.java | 47 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/ |
D | AppSearchPackageTest.java | 41 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 …]
|
D | AppSearchInstantAppTest.java | 53 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/ |
D | BlobStoreMultiUserTest.java | 38 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/ |
D | PackageVisibilityTest.java | 58 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 …]
|
D | InstantAppUserTest.java | 63 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()
|
D | BaseAppSecurityTest.java | 36 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()
|
D | PackageSetInstallerTest.kt | 128 .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/ |
D | BaseContextCrossProfileTest.java | 46 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()
|