Add CVE-2019-9464 tests to STS
Fixes: 143367819
Test: atest CtsPermissionTestCases
Change-Id: I82ebf392818f723e4681b51776ac1d07efccc09f
diff --git a/tests/tests/permission/src/android/permission/cts/LocationAccessCheckTest.java b/tests/tests/permission/src/android/permission/cts/LocationAccessCheckTest.java
index 4ecf5b6..29dfea1 100644
--- a/tests/tests/permission/src/android/permission/cts/LocationAccessCheckTest.java
+++ b/tests/tests/permission/src/android/permission/cts/LocationAccessCheckTest.java
@@ -58,6 +58,7 @@
import android.os.Looper;
import android.os.ParcelFileDescriptor;
import android.platform.test.annotations.AppModeFull;
+import android.platform.test.annotations.SecurityTest;
import android.provider.DeviceConfig;
import android.provider.Settings;
import android.service.notification.NotificationListenerService;
@@ -533,6 +534,7 @@
}
@Test
+ @SecurityTest(minPatchLevel="2019-12-01")
public void notificationIsShownOnlyOnce() throws Throwable {
accessLocation();
getNotification(true);
@@ -541,6 +543,7 @@
}
@Test
+ @SecurityTest(minPatchLevel="2019-12-01")
public void notificationIsShownAgainAfterClear() throws Throwable {
accessLocation();
getNotification(true);
@@ -577,6 +580,7 @@
}
@Test
+ @SecurityTest(minPatchLevel="2019-12-01")
public void removeNotificationOnUninstall() throws Throwable {
accessLocation();
getNotification(false);
@@ -616,6 +620,7 @@
}
@Test
+ @SecurityTest(minPatchLevel="2019-12-01")
public void noNotificationIfFeatureDisabled() throws Throwable {
disableLocationAccessCheck();
accessLocation();
@@ -623,6 +628,7 @@
}
@Test
+ @SecurityTest(minPatchLevel="2019-12-01")
public void notificationOnlyForAccessesSinceFeatureWasEnabled() throws Throwable {
// Disable the feature and access location in disabled state
disableLocationAccessCheck();
@@ -639,6 +645,7 @@
}
@Test
+ @SecurityTest(minPatchLevel="2019-12-01")
public void noNotificationIfBlamerNotSystemOrLocationProvider() throws Throwable {
// Blame the app for access from an untrusted for notification purposes package.
runWithShellPermissionIdentity(() -> {
@@ -650,6 +657,7 @@
}
@Test
+ @SecurityTest(minPatchLevel="2019-12-01")
public void testOpeningLocationSettingsDoesNotTriggerAccess() throws Throwable {
Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);