Add Media Management Apps activity in Special App Access
Add a settings page to control the permission MANAGE_MEDIA in Special
App Access. Apps can launch it by ACTION_REQUEST_MANAGE_MEDIA.
Test: m -j RunSettingsRoboTests ROBOTEST_FILTER=MediaManagementAppsDetailsTest
Test: m -j RunSettingsRoboTests
Test: manual
Bug: 181112025
Change-Id: Id7587cf179b8c5adbfd6477ca9c2d4a20a9852bb
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 30f181a..91854b0 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -3185,6 +3185,33 @@
android:value="com.android.settings.applications.appinfo.ManageExternalStorageDetails" />
</activity>
+ <activity
+ android:name="Settings$MediaManagementAppsActivity"
+ android:exported="true"
+ android:label="@string/media_management_apps_title">
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.REQUEST_MANAGE_MEDIA" />
+ <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$AppMediaManagementAppsActivity"
+ android:exported="true"
+ android:label="@string/media_management_apps_title">
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.REQUEST_MANAGE_MEDIA" />
+ <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.MediaManagementAppsDetails" />
+ </activity>
+
<!-- Keep compatibility with old WebView-picker implementation -->
<activity-alias android:name=".WebViewImplementation"
android:targetActivity="Settings$WebViewAppPickerActivity"