Add activities to handle external storage intents

Adds 2 activities with the appropriate intent-filters to handle intents
used to control OP_MANAGE_EXTERNAL_STORAGE:
* Generic activity to handle ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION
  which control all apps (that request MANAGE_EXTERNAL_STORAGE).
* App specific activity to handle
  ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION. The intent filter
  expects the name of the package as data in the intent.

Test: manual
Bug: 146425146
Change-Id: Iebc7d153eac6ffe0b9bd75196bc8ecf9cb687939
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4300e58..9478578 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2842,6 +2842,32 @@
             </intent-filter>
         </activity>
 
+        <activity
+            android:name="Settings$ManageExternalStorageActivity"
+            android:label="@string/manage_external_storage_title">
+            <intent-filter android:priority="1">
+                <action android:name="android.settings.MANAGE_ALL_FILES_ACCESS_PERMISSION" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+                       android:value="com.android.settings.applications.manageapplications.ManageApplications" />
+            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+                       android:value="true" />
+        </activity>
+
+        <activity
+            android:name="Settings$AppManageExternalStorageActivity"
+            android:label="@string/manage_external_storage_title"
+            android:permission="android.permission.MANAGE_EXTERNAL_STORAGE">
+            <intent-filter android:priority="1">
+                <action android:name="android.settings.MANAGE_APP_ALL_FILES_ACCESS_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.ManageExternalStorageDetails" />
+        </activity>
+
         <!-- Keep compatibility with old WebView-picker implementation -->
         <activity-alias android:name=".WebViewImplementation"
                   android:targetActivity="Settings$WebViewAppPickerActivity"