RemoteController class to expose IRemoteControlDisplay features

Wrap all the features of IRemoteControlDisplay.aidl in a
 new class, RemoteController, that implements the
 IRemoteControlDisplay interface.

The API functions to expose in the SDK are tagged with
 "CANDIDATE FOR API"

Bug 8209392

Change-Id: I597bcd503ac93e73889c9ae8b47b16c4fcb363bc
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index c2a830d..6898ab0 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2107,6 +2107,13 @@
         android:description="@string/permdesc_captureSecureVideoOutput"
         android:protectionLevel="signature|system" />
 
+    <!--@hide Allows an application to know what content is playing and control its playback.
+         <p>Not for use by third-party applications due to privacy of media consumption</p>  -->
+    <permission android:name="android.permission.MEDIA_CONTENT_CONTROL"
+        android:label="@string/permlab_mediaContentControl"
+        android:description="@string/permdesc_mediaContentControl"
+        android:protectionLevel="signature|system" />
+
     <!-- Required to be able to disable the device (very dangerous!).
     <p>Not for use by third-party applications.. -->
     <permission android:name="android.permission.BRICK"
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 99b703b..56b8ca4 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -1433,6 +1433,11 @@
     <string name="permdesc_captureSecureVideoOutput">Allows the app to capture and redirect secure video output.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permlab_mediaContentControl">control media playback and metadata access</string>
+    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permdesc_mediaContentControl">Allows the app to control media playback and access the media information (title, author...).</string>
+
+    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_modifyAudioSettings">change your audio settings</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permdesc_modifyAudioSettings">Allows the app to modify global audio settings such as volume and which speaker is used for output.</string>