am e3c3dc95: am 9b620cba: am 4e452240: am b8664b37: Merge "According to external test, delete playlists after inserting internal data. It will keep clean environment."

* commit 'e3c3dc95df945b385d550836d0c8c5cf5b17de22':
  According to external test, delete playlists after inserting internal data. It will keep clean environment.
diff --git a/tests/tests/provider/src/android/provider/cts/MediaStore_Audio_PlaylistsTest.java b/tests/tests/provider/src/android/provider/cts/MediaStore_Audio_PlaylistsTest.java
index 19fa2e1..0d36212 100644
--- a/tests/tests/provider/src/android/provider/cts/MediaStore_Audio_PlaylistsTest.java
+++ b/tests/tests/provider/src/android/provider/cts/MediaStore_Audio_PlaylistsTest.java
@@ -114,9 +114,16 @@
         values.put(Playlists.DATE_ADDED, dateAdded);
         long dateModified = System.currentTimeMillis();
         values.put(Playlists.DATE_MODIFIED, dateModified);
+        // insert
         Uri uri = mContentResolver.insert(Playlists.INTERNAL_CONTENT_URI, values);
         assertNotNull(uri);
-        assertTrue(Pattern.matches("content://media/internal/audio/playlists/\\d+",
-                uri.toString()));
+
+        try {
+            assertTrue(Pattern.matches("content://media/internal/audio/playlists/\\d+",
+                    uri.toString()));
+        } finally {
+            // delete the playlists
+            assertEquals(1, mContentResolver.delete(uri, null, null));
+        }
     }
 }
diff --git a/tests/tests/provider/src/android/provider/cts/MediaStore_Audio_Playlists_MembersTest.java b/tests/tests/provider/src/android/provider/cts/MediaStore_Audio_Playlists_MembersTest.java
index 9ae42ae..aa524aa 100644
--- a/tests/tests/provider/src/android/provider/cts/MediaStore_Audio_Playlists_MembersTest.java
+++ b/tests/tests/provider/src/android/provider/cts/MediaStore_Audio_Playlists_MembersTest.java
@@ -456,9 +456,16 @@
         values.put(Playlists.DATE_ADDED, dateAdded);
         long dateModified = System.currentTimeMillis();
         values.put(Playlists.DATE_MODIFIED, dateModified);
+        // insert
         Uri uri = mContentResolver.insert(Playlists.INTERNAL_CONTENT_URI, values);
         assertNotNull(uri);
-        assertTrue(Pattern.matches("content://media/internal/audio/playlists/\\d+",
-                uri.toString()));
+
+        try {
+            assertTrue(Pattern.matches("content://media/internal/audio/playlists/\\d+",
+                    uri.toString()));
+        } finally {
+            // delete the playlists
+            assertEquals(1, mContentResolver.delete(uri, null, null));
+        }
     }
 }