/cts/common/device-side/bedstead/testapp/src/test/java/com/android/bedstead/testapp/ |
D | TestAppTest.java | 54 TestApp testApp = sDeviceState.testApps().any(); in reference_returnsNeneReference() local 56 assertThat(testApp.pkg()).isEqualTo(TestApis.packages().find(testApp.packageName())); in reference_returnsNeneReference() 61 TestApp testApp = sDeviceState.testApps().any(); in install_noUserSpecified_installsInInstrumentedUser() local 63 testApp.install(); in install_noUserSpecified_installsInInstrumentedUser() 66 assertThat(testApp.pkg().installedOnUser(sUser)).isTrue(); in install_noUserSpecified_installsInInstrumentedUser() 68 testApp.uninstall(sUser); in install_noUserSpecified_installsInInstrumentedUser() 74 TestApp testApp = sDeviceState.testApps().any(); in install_userReference_installs() local 76 testApp.install(sUser); in install_userReference_installs() 79 assertThat(testApp.pkg().installedOnUser(sUser)).isTrue(); in install_userReference_installs() 81 testApp.uninstall(sUser); in install_userReference_installs() [all …]
|
D | TestAppProviderTest.java | 395 TestApp testApp = mTestAppProvider.query() in query_testOnly_returnsMatching() local 399 assertThat(testApp.testOnly()).isTrue(); in query_testOnly_returnsMatching() 404 TestApp testApp = mTestAppProvider.query() in query_notTestOnly_returnsMatching() local 408 assertThat(testApp.testOnly()).isFalse(); in query_notTestOnly_returnsMatching() 413 TestApp testApp = mTestAppProvider.query() in query_minSdkVersion_returnsMatching() local 417 assertThat(testApp.minSdkVersion()).isAtLeast(28); in query_minSdkVersion_returnsMatching() 422 TestApp testApp = mTestAppProvider.query() in query_targetSdkVersion_returnsMatching() local 426 assertThat(testApp.targetSdkVersion()).isAtLeast(28); in query_targetSdkVersion_returnsMatching() 431 TestApp testApp = mTestAppProvider.query() in query_withPermission_returnsMatching() local 435 assertThat(testApp.permissions()).contains(PERMISSION_DECLARED_BY_TESTAPP); in query_withPermission_returnsMatching() [all …]
|
D | TestAppInstanceTest.java | 94 assertThat(testAppInstance.testApp()).isEqualTo(sTestApp); in testApp_returnsTestApp() 466 try (TestAppInstance testApp = sTestApp.install(); in permissions_withPermission_permissionStateAppliesToCallsToTestApp() argument 467 PermissionContext p = testApp.permissions().withPermission(READ_CONTACTS)) { in permissions_withPermission_permissionStateAppliesToCallsToTestApp() 468 assertThat(testApp.context().checkSelfPermission( in permissions_withPermission_permissionStateAppliesToCallsToTestApp() 475 try (TestAppInstance testApp = sTestApp.install(); in permissions_withPermission_permissionStateDoesNotApplyToOtherTestApps() argument 477 PermissionContext p = testApp.permissions().withPermission(READ_CONTACTS)) { in permissions_withPermission_permissionStateDoesNotApplyToOtherTestApps() 485 try (TestAppInstance testApp = sTestApp.install(); in permissions_withPermission_permissionStateDoesNotApplyToInstrumentedApp() argument 486 PermissionContext p = testApp.permissions().withPermission(READ_CONTACTS)) { in permissions_withPermission_permissionStateDoesNotApplyToInstrumentedApp() 494 try (TestAppInstance testApp = sTestApp.install(); in permissions_withPermission_permissionStateDoesNotApplyToInstrumentedAppAfterCall() argument 495 PermissionContext p = testApp.permissions().withPermission(READ_CONTACTS)) { in permissions_withPermission_permissionStateDoesNotApplyToInstrumentedAppAfterCall() [all …]
|
D | TestAppActivityReferenceTest.java | 48 TestApp testApp = sDeviceState.testApps().query().whereActivities().isNotEmpty().get(); in start_activityIsStarted() local 49 try (TestAppInstance testAppInstance = testApp.install(sUser)) { in start_activityIsStarted() 59 TestApp testApp = sDeviceState.testApps().query().whereActivities().isNotEmpty().get(); in remote_executes() local 60 try (TestAppInstance testAppInstance = testApp.install(sUser)) { in remote_executes()
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | PackageSuspensionTest.java | 64 String testApp = sDeviceState.testApp().packageName(); in isPackageSuspended_packageIsSuspended_returnsTrue() local 67 mAdmin, new String[] {testApp}, /* suspended */ true); in isPackageSuspended_packageIsSuspended_returnsTrue() 70 sDeviceState.dpc().devicePolicyManager().isPackageSuspended(mAdmin, testApp) in isPackageSuspended_packageIsSuspended_returnsTrue() 74 mAdmin, new String[] {testApp}, /* suspended */ false); in isPackageSuspended_packageIsSuspended_returnsTrue() 82 String testApp = sDeviceState.testApp().packageName(); in isPackageSuspended_packageIsNotSuspended_returnFalse() local 85 mAdmin, new String[] {testApp}, /* suspended */ false); in isPackageSuspended_packageIsNotSuspended_returnFalse() 87 assertThat(sDeviceState.dpc().devicePolicyManager().isPackageSuspended(mAdmin, testApp)) in isPackageSuspended_packageIsNotSuspended_returnFalse() 96 String testApp = sDeviceState.testApp().packageName(); in setPackagesSuspended_suspendSuccessful() local 99 mAdmin, new String[] {testApp}, /* suspended */ true) in setPackagesSuspended_suspendSuccessful() 102 mAdmin, testApp) in setPackagesSuspended_suspendSuccessful() [all …]
|
D | DelegationScopesTest.java | 85 try (TestAppInstance testApp = sTestApp.install(sUser)) { in getDelegatedScopes_returnsFromSetDelegatedScopes() argument 89 testApp.packageName(), in getDelegatedScopes_returnsFromSetDelegatedScopes() 94 testApp.packageName())) in getDelegatedScopes_returnsFromSetDelegatedScopes() 97 resetDelegatedScopes(testApp); in getDelegatedScopes_returnsFromSetDelegatedScopes() 104 try (TestAppInstance testApp = sTestApp.install(sUser)) { in getDelegatedScopes_fromApp_returnsFromSetDelegatedScopes() argument 108 testApp.packageName(), in getDelegatedScopes_fromApp_returnsFromSetDelegatedScopes() 111 assertThat(testApp.devicePolicyManager().getDelegatedScopes( in getDelegatedScopes_fromApp_returnsFromSetDelegatedScopes() 112 null, testApp.packageName())) in getDelegatedScopes_fromApp_returnsFromSetDelegatedScopes() 115 resetDelegatedScopes(testApp); in getDelegatedScopes_fromApp_returnsFromSetDelegatedScopes() 122 try (TestAppInstance testApp = sTestApp.install(sUser)) { in getDelegatedScopes_fromApp_passComponentName_throwsException() argument [all …]
|
D | DeviceIdentifiersTest.java | 60 try (TestAppInstance testApp = sSmsTestApp.install(); in getDeviceId_smsAppReturnsSameValue() argument 61 RoleContext r = TestApis.packages().find(testApp.packageName()).setAsRoleHolder( in getDeviceId_smsAppReturnsSameValue() 63 assertThat(testApp.telephonyManager().getDeviceId()).isEqualTo(deviceId); in getDeviceId_smsAppReturnsSameValue() 74 try (TestAppInstance testApp = sSmsTestApp.install(); in getImei_withReadPrivilegedPhoneStatePermission_withReadPhoneStatePermission_returnsSameValue() argument 75 RoleContext r = TestApis.packages().find(testApp.packageName()).setAsRoleHolder( in getImei_withReadPrivilegedPhoneStatePermission_withReadPhoneStatePermission_returnsSameValue() 77 assertThat(testApp.telephonyManager().getImei()).isEqualTo(deviceId); in getImei_withReadPrivilegedPhoneStatePermission_withReadPhoneStatePermission_returnsSameValue() 88 try (TestAppInstance testApp = sSmsTestApp.install(); in getMeid_withReadPrivilegedPhoneStatePermission_withReadPhoneStatePermission_returnsSameValue() argument 89 RoleContext r = TestApis.packages().find(testApp.packageName()).setAsRoleHolder( in getMeid_withReadPrivilegedPhoneStatePermission_withReadPhoneStatePermission_returnsSameValue() 91 assertThat(testApp.telephonyManager().getMeid()).isEqualTo(deviceId); in getMeid_withReadPrivilegedPhoneStatePermission_withReadPhoneStatePermission_returnsSameValue() 102 try (TestAppInstance testApp = sSmsTestApp.install(); in getSubscriberId_withReadPrivilegedPhoneStatePermission_withReadPhoneStatePermission_returnsSameValue() argument [all …]
|
D | LockTaskTest.kt | 128 testApp.install().use { testApp -> in <lambda>() method 130 deviceState.dpc().componentName(), arrayOf(testApp.packageName()) in <lambda>() 132 val activity = testApp.activities().any().start() in <lambda>() 144 .contains(testApp.packageName()) in <lambda>() 297 deviceState.dpc().componentName(), arrayOf(testApp.packageName()) in <lambda>() 320 deviceState.dpc().componentName(), arrayOf(testApp.packageName()) in <lambda>() 344 deviceState.dpc().componentName(), arrayOf(testApp.packageName()) in <lambda>() 368 deviceState.dpc().componentName(), arrayOf(testApp.packageName()) in <lambda>() 414 deviceState.dpc().componentName(), arrayOf(testApp.packageName()) in <lambda>() 417 testApp.install().use { testApp -> in <lambda>() method [all …]
|
D | ApplicationHiddenTest.java | 143 sDeviceState.testApp().packageName())); in isApplicationHidden_notSystemApp_throwsException() 152 sDeviceState.testApp().packageName())); in isApplicationHidden_notPermitted_throwsException() 160 sDeviceState.dpc().componentName(), sDeviceState.testApp().packageName(), in isApplicationHidden_notSystemApp_isHidden_returnsTrue() 165 sDeviceState.testApp().packageName())).isTrue(); in isApplicationHidden_notSystemApp_isHidden_returnsTrue() 168 sDeviceState.dpc().componentName(), sDeviceState.testApp().packageName(), in isApplicationHidden_notSystemApp_isHidden_returnsTrue() 178 sDeviceState.dpc().componentName(), sDeviceState.testApp().packageName(), in isApplicationHidden_notSystemApp_isNotHidden_returnsFalse() 183 sDeviceState.testApp().packageName())).isFalse(); in isApplicationHidden_notSystemApp_isNotHidden_returnsFalse() 186 sDeviceState.dpc().componentName(), sDeviceState.testApp().packageName(), in isApplicationHidden_notSystemApp_isNotHidden_returnsFalse() 239 sDeviceState.dpc().componentName(), sDeviceState.testApp().packageName(), in setApplicationHidden_nonSystemApp_true_hidesApplication() 245 isSchemeSpecificPart(sDeviceState.testApp().packageName()))) { in setApplicationHidden_nonSystemApp_true_hidesApplication() [all …]
|
D | ApplicationExemptionsTest.java | 114 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationExemptions_noPermission_throwsSecurityException() argument 129 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationExemptions_validExemptionSet_exemptionAppOpsGranted() argument 146 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationExemptions_emptyExemptionSet_unsetsAllExemptions() argument 166 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationExemptions_invalidExemptionInSet_throwsIllegalArgumentException() argument 190 try (TestAppInstance testApp = sTestApp.install()) { in getApplicationExemptions_noPermission_throwsSecurityException() argument 203 try (TestAppInstance testApp = sTestApp.install()) { in getApplicationExemptions_validPackage_returnsExemptionsSet() argument 230 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationExemptions_reinstallApplication_exemptionAppOpsReset() argument 236 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationExemptions_reinstallApplication_exemptionAppOpsReset() argument 250 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationExemptions_powerRestrictionExemption_exemptedAppStandbyBucket() argument 271 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationExemptions_powerRestrictionExemption_allowsBgUsage() argument [all …]
|
D | ApplicationRestrictionsTest.java | 92 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationRestrictions_applicationRestrictionsAreSet() argument 100 testApp.userManager().getApplicationRestrictions(sTestApp.packageName())); in setApplicationRestrictions_applicationRestrictionsAreSet() 119 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationRestrictions_applicationRestrictionsAlreadySet_setsNewRestrictions() argument 131 testApp.userManager().getApplicationRestrictions(sTestApp.packageName())); in setApplicationRestrictions_applicationRestrictionsAlreadySet_setsNewRestrictions() 236 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationRestrictions_policyDoesNotApply_applicationRestrictionsAreNotSet() argument 244 testApp.userManager().getApplicationRestrictions(sTestApp.packageName())); in setApplicationRestrictions_policyDoesNotApply_applicationRestrictionsAreNotSet() 297 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationRestrictions_restrictionsChangedBroadcastIsReceived() argument 298 testApp.registerReceiver(new IntentFilter(ACTION_APPLICATION_RESTRICTIONS_CHANGED), in setApplicationRestrictions_restrictionsChangedBroadcastIsReceived() 306 assertThat(testApp.events().broadcastReceived().whereIntent().action().isEqualTo( in setApplicationRestrictions_restrictionsChangedBroadcastIsReceived() 322 try (TestAppInstance testApp = sTestApp.install()) { in setApplicationRestrictionsManagingPackage_applicationRestrictionsManagingPackageIsSet() argument [all …]
|
D | CheckFinancedTest.java | 79 try (TestAppInstance testApp = sTestApp.install()) { in isDeviceFinanced_isNotFinanced_returnsFalse() argument 90 try (TestAppInstance testApp = sTestApp.install()) { in isDeviceFinanced_isFinanced_returnsTrue() argument 91 setUpFinancedDeviceKioskRole(testApp.packageName()); in isDeviceFinanced_isFinanced_returnsTrue() 130 try (TestAppInstance testApp = sTestApp.install(); in getFinancedDeviceKioskRoleHolder_isFinanced_returnsRoleHolder() argument 132 setUpFinancedDeviceKioskRole(testApp.packageName()); in getFinancedDeviceKioskRoleHolder_isFinanced_returnsRoleHolder() 136 .isEqualTo(testApp.packageName()); in getFinancedDeviceKioskRoleHolder_isFinanced_returnsRoleHolder() 153 try (TestAppInstance testApp = sTestApp.install()) { in deviceFinancingStateChanged_roleAdded_ReceivesBroadcast() argument 154 setUpFinancedDeviceKioskRole(testApp.packageName()); in deviceFinancingStateChanged_roleAdded_ReceivesBroadcast()
|
D | PersonalAppsSuspensionTest.java | 92 try (TestAppInstance testApp = sTestApp.install()) { in setPersonalAppsSuspended_cannotStartActivity() argument 95 TestAppActivityReference activity = testApp.activities().any(); in setPersonalAppsSuspended_cannotStartActivity() 112 try (TestAppInstance testApp = sTestApp.install()) { in setPersonalAppsSuspended_policyDoesNotApply_canStartActivity() argument 115 TestAppActivityReference activity = testApp.activities().any(); in setPersonalAppsSuspended_policyDoesNotApply_canStartActivity() 134 try (TestAppInstance testApp = sSmsTestApp.install(); in setPersonalAppsSuspended_smsApp_canStartActivity() argument 135 RoleContext r = TestApis.packages().find(testApp.packageName()).setAsRoleHolder( in setPersonalAppsSuspended_smsApp_canStartActivity() 140 testApp.activities().query().whereActivity().activityClass().simpleName() in setPersonalAppsSuspended_smsApp_canStartActivity()
|
D | TransferOwnershipTest.kt | 55 targetDeviceAdminTestAppSupportsTransferOwnership.install().use { testApp -> in <lambda>() method 62 testApp.devicePolicyManager().transferOwnershipBundle.getBoolean(KEY)).isTrue() in <lambda>() 86 targetDeviceAdminTestAppSupportsTransferOwnership.install().use { testApp -> in <lambda>() method 93 testApp.devicePolicyManager().transferOwnershipBundle.isEmpty()).isTrue() in <lambda>() 174 targetDeviceAdminTestAppSupportsTransferOwnership.install().use { testApp -> in <lambda>() method 182 assertThat(testApp.devicePolicyManager().getCameraDisabled(targetAdmin)).isTrue() in <lambda>() 275 targetDeviceAdminTestAppSupportsTransferOwnership.install().use {testApp -> in <lambda>() method 281 assertThat(testApp.events().transferOwnershipComplete() in <lambda>()
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/packages/ |
D | ProcessReferenceTest.java | 46 try (TestAppInstance testApp = sTestApp.install()) { in kill_killsProcess() argument 47 testApp.activities().query().whereActivity().exported().isTrue().get().start(); in kill_killsProcess() 49 int pidBefore = testApp.process().pid(); in kill_killsProcess() 51 testApp.process().kill(); in kill_killsProcess() 54 () -> testApp.process() == null ? -1 : testApp.process().pid()) in kill_killsProcess() 63 try (TestAppInstance testApp = sTestApp.install()) { in crash_crashesProcess() argument 64 testApp.activities().query().whereActivity().exported().isTrue().get().start(); in crash_crashesProcess() 66 int pidBefore = testApp.process().pid(); in crash_crashesProcess() 68 testApp.process().crash(); in crash_crashesProcess() 71 () -> testApp.process() == null ? -1 : testApp.process().pid()) in crash_crashesProcess()
|
/cts/tests/tests/companion/core/src/android/companion/cts/core/ |
D | AssociationsCleanUpTest.kt | 45 testApp.associate(MAC_ADDRESS_A) in <lambda>() 46 testApp.associate(MAC_ADDRESS_B) in <lambda>() 52 testApp.packageName to MAC_ADDRESS_A, in <lambda>() 53 testApp.packageName to MAC_ADDRESS_B, in <lambda>() 58 testApp.clearData() in <lambda>() 59 assertAssociationsRemovedFor(testApp) in <lambda>() 71 testApp.associate(MAC_ADDRESS_A) in <lambda>() 72 testApp.associate(MAC_ADDRESS_B) in <lambda>() 78 testApp.packageName to MAC_ADDRESS_A, in <lambda>() 79 testApp.packageName to MAC_ADDRESS_B, in <lambda>() [all …]
|
D | BackupAndRestoreTest.kt | 147 testApp.associate(MAC_ADDRESS_A) in <lambda>() 148 assertAssociationsAddedFor(testApp, MAC_ADDRESS_A) in <lambda>() 152 testApp.uninstall() in <lambda>() 153 assertAssociationsRemovedFor(testApp) in <lambda>() 157 assertAssociationsRemovedFor(testApp) in <lambda>() 160 testApp.install() in <lambda>() 161 assertAssociationsAddedFor(testApp, MAC_ADDRESS_A) in <lambda>() 167 testApp.associate(MAC_ADDRESS_A, DEVICE_PROFILE_WATCH) in <lambda>() 168 assertAssociationsAddedFor(testApp, MAC_ADDRESS_A) in <lambda>() 169 assertRoleGrantedToApp(testApp, DEVICE_PROFILE_WATCH) in <lambda>() [all …]
|
D | CoreTestBase.kt | 10 protected val testApp = AppHelper( constant in android.companion.cts.core.CoreTestBase 18 with(testApp) { in setUp()
|
/cts/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/ |
D | TestAppsComponent.kt | 121 fun ensureTestAppInstalled(testApp: TestApp, user: UserReference): TestAppInstance? { in ensureTestAppInstalled() 122 return ensureTestAppInstalled(key = null, testApp, user) in ensureTestAppInstalled() 130 testApp: TestApp, in ensureTestAppInstalled() 139 val pkg = packages().find(testApp.packageName()) in ensureTestAppInstalled() 141 if (pkg != null && packages().find(testApp.packageName()).installedOnUser(user)) { in ensureTestAppInstalled() 142 testAppInstance = testApp.instance(user) in ensureTestAppInstalled() 147 testAppInstance = testApp.install(user) in ensureTestAppInstalled() 163 fun ensureTestAppNotInstalled(testApp: TestApp, user: UserReference?) { in ensureTestAppNotInstalled() 164 val pkg = packages().find(testApp.packageName()) in ensureTestAppNotInstalled() 165 if (pkg == null || !packages().find(testApp.packageName()).installedOnUser(user)) { in ensureTestAppNotInstalled() [all …]
|
/cts/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/src/android/scopedstorage/cts/lib/ |
D | TestUtils.java | 279 public static ArrayList<String> listAs(TestApp testApp, String dirPath) throws Exception { in listAs() argument 280 return getContentsFromTestApp(testApp, dirPath, READDIR_QUERY); in listAs() 287 public static boolean canReadAndWriteAs(TestApp testApp, String path) throws Exception { in canReadAndWriteAs() argument 288 return getResultFromTestApp(testApp, path, CAN_READ_WRITE_QUERY); in canReadAndWriteAs() 296 TestApp testApp, String filePath) throws Exception { in readExifMetadataFromTestApp() argument 298 getMetadataFromTestApp(testApp, filePath, EXIF_METADATA_QUERY); in readExifMetadataFromTestApp() 307 public static boolean createFileAs(TestApp testApp, String path) throws Exception { in createFileAs() argument 308 return getResultFromTestApp(testApp, path, CREATE_FILE_QUERY); in createFileAs() 316 public static boolean createFileAs(TestApp testApp, String path, IBinder content) in createFileAs() argument 318 return getResultFromTestApp(testApp, path, CREATE_FILE_QUERY, content); in createFileAs() [all …]
|
/cts/common/device-side/bedstead/remotedpc/src/main/java/com/android/bedstead/remotedpc/ |
D | RemoteDpc.java | 219 TestApp testApp = dpcQuery.get(); in setAsDeviceOwner() local 220 testApp.install(user); in setAsDeviceOwner() 221 Log.i(LOG_TAG, "Installing RemoteDPC app: " + testApp.packageName()); in setAsDeviceOwner() 223 new ComponentName(testApp.packageName(), TEST_APP_CLASS_NAME); in setAsDeviceOwner() 225 return new RemoteDpc(testApp, deviceOwner); in setAsDeviceOwner() 430 TestApp testApp = dpcQuery.get(); in createWorkProfile() local 431 if (!testApp.installedOnUser(parent)) { in createWorkProfile() 432 Log.i(LOG_TAG, "Installing RemoteDPC app: " + testApp.packageName()); in createWorkProfile() 433 testApp.install(parent); in createWorkProfile() 441 new ComponentName(testApp.packageName(), TEST_APP_CLASS_NAME), in createWorkProfile() [all …]
|
D | RemotePolicyManager.java | 30 RemotePolicyManager(TestApp testApp, UserReference user) { in RemotePolicyManager() argument 31 super(testApp, user); in RemotePolicyManager()
|
D | RemoteDevicePolicyManagerRoleHolder.java | 35 public RemoteDevicePolicyManagerRoleHolder(TestApp testApp, UserReference user) { in RemoteDevicePolicyManagerRoleHolder() argument 36 super(testApp, user); in RemoteDevicePolicyManagerRoleHolder()
|
D | RemoteDelegate.java | 37 public RemoteDelegate(TestApp testApp, UserReference user) { in RemoteDelegate() argument 38 super(testApp, user); in RemoteDelegate()
|
/cts/common/device-side/bedstead/remoteaccountauthenticator/src/test/java/com/android/bedstead/remoteaccountauthenticator/ |
D | RemoteAccountAuthenticatorTest.java | 40 assertThat(authenticator.testApp().pkg().installedOnUser()).isTrue(); in install_appIsInstalled() 49 assertThat(authenticator.testApp().pkg().installedOnUser( in install_differentUser_appIsInstalled() 61 assertThat(authenticator.testApp().pkg().installedOnUser()).isFalse(); in autoclose_appIsUninstalled()
|