summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-03-19 07:04:32 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-03-19 07:04:32 +0000
commitbfca67e4151ef04ba842d6352aa1feedd224c45a (patch)
tree8773c7f508de25244a46be206e236c6cfa80b734
parent3ef586a448817b453341c88f98aadebe808ad3a0 (diff)
parent712a26d4699052044dfeb1300da3e9a3a9450508 (diff)
downloadcts-android13-platform-release.tar.gz
Merge cherrypicks of ['googleplex-android-review.googlesource.com/24529771'] into tm-platform-release.android-platform-13.0.0_r19android13-platform-release
Change-Id: I5d5242119b1082f0d1765bec3aaeb141e5a8b804
-rw-r--r--tests/tests/provider/src/android/provider/cts/settings/Settings_SystemTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/tests/provider/src/android/provider/cts/settings/Settings_SystemTest.java b/tests/tests/provider/src/android/provider/cts/settings/Settings_SystemTest.java
index 9c603f8ede3..0de990eddf2 100644
--- a/tests/tests/provider/src/android/provider/cts/settings/Settings_SystemTest.java
+++ b/tests/tests/provider/src/android/provider/cts/settings/Settings_SystemTest.java
@@ -16,6 +16,8 @@
package android.provider.cts.settings;
+import static com.google.common.truth.Truth.assertThat;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -181,6 +183,17 @@ public class Settings_SystemTest extends StsExtraBusinessLogicTestCase {
}
@Test
+ @AsbSecurityTest(cveBugId = 227201030)
+ public void testInvalidRingtoneUriIsRejected() {
+ final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver();
+ final String originalValue = System.getString(cr, System.RINGTONE);
+ final String invalidUri = "content://10@media/external/audio/media/1000000019";
+ System.putString(cr, System.RINGTONE, invalidUri);
+ // Assert that the insertion didn't take effect
+ assertThat(System.getString(cr, System.RINGTONE)).isEqualTo(originalValue);
+ }
+
+ @Test
public void testGetDefaultValues() {
final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver();