Add activity for MANAGE_APP_OVERLAY_PERMISSION intent in Settings

In order to support system use-cases, such as when the user wants do
revoke SYSTEM_ALERT_WINDOW (SAW) permission via notification, we are
introducing a new intent, MANAGE_APP_OVERLAY_PERMISSION (notice the
"APP_"), that directs the user to the app-specific screen to toggle SAW
permission.

This activity can only be started if the caller has
INTERNAL_SYSTEM_WINDOW permission, which sysui and the system have.

Test: atest TestManageOverlayPermissionIntents
      (cts in one of the topic CLs)
Test: Let an app draw on top of other apps, via its notification go to
      settings, verify that the screen for controlling such capability
      for the app is dispayed.
Bug: 135920175

Change-Id: I2f7e02a1242af7a22098359aeb230888fb8d4f3a
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index c2dcd15..ed0062a 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2722,6 +2722,19 @@
         </activity>
 
         <activity
+            android:name="Settings$AppDrawOverlaySettingsActivity"
+            android:label="@string/draw_overlay"
+            android:permission="android.permission.INTERNAL_SYSTEM_WINDOW">
+            <intent-filter android:priority="1">
+                <action android:name="android.settings.MANAGE_APP_OVERLAY_PERMISSION" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <data android:scheme="package" />
+            </intent-filter>
+            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+                       android:value="com.android.settings.applications.appinfo.DrawOverlayDetails" />
+        </activity>
+
+        <activity
             android:name="Settings$WriteSettingsActivity"
             android:label="@string/write_settings_title">
             <intent-filter android:priority="1">