Introduce the REPORT_USAGE_STATS permission.

This is a new signature|module permission which will only be held by
the system and mainline modules. It will be required to report any
usage events to UsageStatsManager.

Bug: 296056771
Test: atest CtsUsageStatsTest
Change-Id: Icc4c00452551b65ce92c1c5f7688108f1bbc2423
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 2b3e8e9..ef1014a 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -308,6 +308,7 @@
     field public static final String REMOVE_DRM_CERTIFICATES = "android.permission.REMOVE_DRM_CERTIFICATES";
     field public static final String REMOVE_TASKS = "android.permission.REMOVE_TASKS";
     field public static final String RENOUNCE_PERMISSIONS = "android.permission.RENOUNCE_PERMISSIONS";
+    field public static final String REPORT_USAGE_STATS = "android.permission.REPORT_USAGE_STATS";
     field @Deprecated public static final String REQUEST_NETWORK_SCORES = "android.permission.REQUEST_NETWORK_SCORES";
     field public static final String REQUEST_NOTIFICATION_ASSISTANT_SERVICE = "android.permission.REQUEST_NOTIFICATION_ASSISTANT_SERVICE";
     field public static final String RESET_PASSWORD = "android.permission.RESET_PASSWORD";
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index ffd640f..6e24d3d 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -6099,6 +6099,10 @@
         android:protectionLevel="signature|privileged|development|appop|retailDemo" />
     <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
 
+    <!-- @SystemApi @hide Allows trusted system components to report events to UsageStatsManager -->
+    <permission android:name="android.permission.REPORT_USAGE_STATS"
+                android:protectionLevel="signature|module" />
+
     <!-- Allows an application to query broadcast response stats (see
          {@link android.app.usage.BroadcastResponseStats}).
          @SystemApi