diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-02 20:36:31 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-05-02 20:36:31 +0000 |
commit | a67d3a5ec9dc23aa35ec3cc395738a0f611a4aff (patch) | |
tree | 69c3a211536c29b5d0ee753a29147db0f0ee3f6b | |
parent | e6695e852be13065481d6d74f008a783c0e3789f (diff) | |
parent | f5b7e96c95dba059b833d9e5e765488ea94ef424 (diff) | |
download | cts-android14-tests-release.tar.gz |
Merge "Snap for 11793264 from b5e53f0db4e574dfd2e10cebfc0d049281848e7e to android14-tests-release" into android14-tests-releaseandroid14-tests-release
4 files changed, 10 insertions, 1 deletions
diff --git a/common/device-side/bedstead/harrier/common/src/main/java/com/android/bedstead/harrier/policies/DisallowPrinting.java b/common/device-side/bedstead/harrier/common/src/main/java/com/android/bedstead/harrier/policies/DisallowPrinting.java index 095e4e4ded2..f34134d7b72 100644 --- a/common/device-side/bedstead/harrier/common/src/main/java/com/android/bedstead/harrier/policies/DisallowPrinting.java +++ b/common/device-side/bedstead/harrier/common/src/main/java/com/android/bedstead/harrier/policies/DisallowPrinting.java @@ -32,7 +32,7 @@ import com.android.bedstead.harrier.annotations.enterprise.EnterprisePolicy; * Policy related to setting {@code DISALLOW_PRINTING} */ @EnterprisePolicy( - dpc = {APPLIED_BY_PROFILE_OWNER | APPLIED_BY_DEVICE_OWNER | APPLIES_TO_OWN_USER | APPLIES_TO_PARENT}, + dpc = {APPLIED_BY_PROFILE_OWNER | APPLIED_BY_DEVICE_OWNER | APPLIES_TO_OWN_USER}, permissions = @EnterprisePolicy.Permission( appliedWith = MANAGE_DEVICE_POLICY_PRINTING, appliesTo = APPLIES_TO_OWN_USER)) public final class DisallowPrinting { diff --git a/tests/tests/appop/src/android/app/appops/cts/AttributionTest.kt b/tests/tests/appop/src/android/app/appops/cts/AttributionTest.kt index def00ed2ea9..8ee509579bc 100644 --- a/tests/tests/appop/src/android/app/appops/cts/AttributionTest.kt +++ b/tests/tests/appop/src/android/app/appops/cts/AttributionTest.kt @@ -109,6 +109,7 @@ class AttributionTest { .isEqualTo(before.attributedOpEntries[ATTRIBUTION_3]!! .getLastAccessTime(OP_FLAGS_ALL)) } + runCommand("pm uninstall $PKG") } @Test diff --git a/tests/tests/appop/src/android/app/appops/cts/RuntimeMessageCollectionTest.kt b/tests/tests/appop/src/android/app/appops/cts/RuntimeMessageCollectionTest.kt index 079d7f489c9..89199ad51dd 100644 --- a/tests/tests/appop/src/android/app/appops/cts/RuntimeMessageCollectionTest.kt +++ b/tests/tests/appop/src/android/app/appops/cts/RuntimeMessageCollectionTest.kt @@ -22,6 +22,7 @@ import androidx.test.platform.app.InstrumentationRegistry import com.google.common.truth.Truth.assertThat import org.junit.Assert.fail import org.junit.Before +import org.junit.After; import org.junit.Test import java.lang.Thread.sleep @@ -49,6 +50,11 @@ class RuntimeMessageCollectionTest { installApk("CtsAppToCollect.apk") } + @After + fun uninstallTestApp() { + runCommand("pm uninstall $APP_PKG") + } + @Test fun collectAsyncStackTrace() { installApk("CtsAppToCollect.apk") diff --git a/tests/tests/keystore/src/android/keystore/cts/KeyAttestationTest.java b/tests/tests/keystore/src/android/keystore/cts/KeyAttestationTest.java index 553d99707f9..5135c9f5ab1 100644 --- a/tests/tests/keystore/src/android/keystore/cts/KeyAttestationTest.java +++ b/tests/tests/keystore/src/android/keystore/cts/KeyAttestationTest.java @@ -390,6 +390,7 @@ public class KeyAttestationTest { public void testAttestationKmVersionMatchesFeatureVersion() throws Exception { if (getContext().getPackageManager().hasSystemFeature(PackageManager.FEATURE_PC)) return; + assumeTrue("Device does not support attestation", TestUtils.isAttestationSupported()); String keystoreAlias = "test_key"; Date now = new Date(); @@ -434,6 +435,7 @@ public class KeyAttestationTest { public void testAttestationKmVersionMatchesFeatureVersionStrongBox() throws Exception { if (getContext().getPackageManager().hasSystemFeature(PackageManager.FEATURE_PC)) return; + assumeTrue("Device does not support attestation", TestUtils.isAttestationSupported()); int keyStoreFeatureVersionStrongBox = TestUtils.getFeatureVersionKeystoreStrongBox(getContext()); |