Implement special app access settings for MEDIA_ROUTING_CONTROL app-op.
Bug: b/307632045
Test: Pair a watch with companion app > Settings > Apps > Special app access > enter "Change Media Output" > Find the companion app > Ensure the special app access is Allowed > ensure companion app is able to call remote media routing APIs > come back to the settings > revoke the access > ensure that now companion app is NOT able to call the remote media routing APIs.
Change-Id: I35487660365ef05f3b998e8ecf13aaed7ba844a9
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 85a443e..cbc9e97 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -4182,6 +4182,25 @@
android:value="@string/menu_key_apps"/>
</activity>
+ <!-- @FlaggedApi("com.android.media.flags.enable_privileged_routing_for_media_routing_control") -->
+ <activity-alias
+ android:name="MediaRoutingControlActivity"
+ android:knownActivityEmbeddingCerts="@array/config_known_host_certs"
+ android:exported="true"
+ android:targetActivity=".spa.SpaBridgeActivity"
+ android:label="@string/media_routing_control_title">
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.REQUEST_MEDIA_ROUTING_CONTROL" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="com.android.settings.spa.DESTINATION"
+ android:value="TogglePermissionAppList/MediaRoutingControl"/>
+ <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
+ android:value="@string/menu_key_apps"/>
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
+ </activity-alias>
+
<!-- Keep compatibility with old WebView-picker implementation -->
<activity-alias android:name=".WebViewImplementation"
android:targetActivity="Settings$WebViewAppPickerActivity"