Fix issue #72151749: Lock down 'clear cache' functionality to...

...only system signature

Apps that hold the original permission are silently ignored.  There
is a new internal permission you must hold to actually delete cache
files.

Test: booted and run, can still clear cache in settings.
Bug: 72151749
Change-Id: I47a5cb697e1a4fa3665ac71aaabcda57bef7b561
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index f6f1d81..cbcadc3 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2955,11 +2955,16 @@
     <permission android:name="android.permission.MANAGE_SCOPED_ACCESS_DIRECTORY_PERMISSIONS"
         android:protectionLevel="signature" />
 
-    <!-- @SystemApi Allows an application to delete cache files.
-    <p>Not for use by third-party applications. -->
+    <!-- @SystemApi Old permission for deleting an app's cache files, no longer used,
+         but signals for us to quietly ignore calls instead of throwing an exception. -->
     <permission android:name="android.permission.DELETE_CACHE_FILES"
         android:protectionLevel="signature|privileged" />
 
+    <!-- Allows an application to delete cache files.
+         @hide -->
+    <permission android:name="android.permission.INTERNAL_DELETE_CACHE_FILES"
+        android:protectionLevel="signature" />
+
     <!-- @SystemApi Allows an application to delete packages.
          <p>Not for use by third-party applications.
          <p>Starting in {@link android.os.Build.VERSION_CODES#N}, user confirmation is requested