Allow privileged app to set media key event listener

If the media key listener is set, the listener will receive the media key
events before any other sessions, but after the global priority session.
If the event is handled by the listener, other sessions cannot get the event.

Privileged app needs permission android.permission.SET_MEDIA_KEY_LISTENER
to set the listener.

Bug: 30125811
Change-Id: I2b2cf4ac7873b70899194701c6921990dcb9de02
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index f7cec81..b4e3dd2 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2632,6 +2632,14 @@
     <permission android:name="android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER"
         android:protectionLevel="signature|privileged|development" />
 
+    <!-- @SystemApi @hide Allows an application to set media key event listener.
+         <p>When it's set, the application will receive the media key event before
+         any other media sessions. If the event is handled by the listener, other sessions
+         cannot get the event.</p>
+         <p>Not for use by third-party applications</p> -->
+    <permission android:name="android.permission.SET_MEDIA_KEY_LISTENER"
+        android:protectionLevel="signature|privileged|development" />
+
     <!-- @SystemApi Required to be able to disable the device (very dangerous!).
          <p>Not for use by third-party applications.
          @hide