STS test for Android Security CVE-2021-0306

Test: sts-tradefed run sts-engbuild-no-spl-lock -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.PermissionEscalationTest#testNoPermissionEscalationAfterReboot
Bug: 173531291
Bug: 154505240
Bug: 173530931
Bug: 168319670
Change-Id: I9b6a1a7434b6196375894462aeed5c770fb10af6
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionEscalationTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionEscalationTest.java
index e241668..e0fe368 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionEscalationTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionEscalationTest.java
@@ -16,6 +16,7 @@
 
 package android.appsecurity.cts;
 
+import android.platform.test.annotations.SecurityTest;
 import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
 import com.android.tradefed.build.IBuildInfo;
 import com.android.tradefed.device.DeviceNotAvailableException;
@@ -64,6 +65,7 @@
                 "testCannotEscalateNonRuntimePermissionsToRuntime");
     }
 
+    @SecurityTest
     public void testNoPermissionEscalationAfterReboot() throws Exception {
         assertNull(getDevice().installPackage(mBuildHelper.getTestFile(
                 APK_DECLARE_NON_RUNTIME_PERMISSIONS), false, false));
diff --git a/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/Android.bp b/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/Android.bp
index fa68a6d..4cbd602 100644
--- a/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/Android.bp
@@ -23,6 +23,7 @@
         "vts",
         "general-tests",
         "mts",
+        "sts",
     ],
     dex_preopt: {
         enabled: false,
diff --git a/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/Android.bp b/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/Android.bp
index 24043ad..4a054d2 100644
--- a/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/Android.bp
@@ -25,6 +25,7 @@
         "vts",
         "general-tests",
         "mts",
+        "sts",
     ],
     optimize: {
         enabled: false,