summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRoboErik <epastern@google.com>2014-03-20 13:33:52 -0700
committerRoboErik <epastern@google.com>2014-04-17 15:02:33 -0700
commit07c7077c54717dbbf2c401ea32d00fa6df6d77c6 (patch)
tree49f9e8019caa93c702c6d2d8213767de3d1499c6 /core
parent46175e152891eabd9051523f2f077de5a5562996 (diff)
downloadframeworks_base-07c7077c54717dbbf2c401ea32d00fa6df6d77c6.zip
frameworks_base-07c7077c54717dbbf2c401ea32d00fa6df6d77c6.tar.gz
frameworks_base-07c7077c54717dbbf2c401ea32d00fa6df6d77c6.tar.bz2
Add RouteProviders to the new Media APIs
Compiles and works with OneMedia. This currently is a rough test of the system for finding, connecting to, and sending messages to routes. This will just connect to the first route it finds when a request to open the route picker is made (and disconnect when another request is made). Change-Id: I5de5521a079471b9e02664be4654c0591dfd9a6d
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/ContextImpl.java4
-rw-r--r--core/java/android/content/Context.java4
-rw-r--r--core/res/AndroidManifest.xml8
-rw-r--r--core/res/res/values/strings.xml6
4 files changed, 18 insertions, 4 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 77b5485..f1ce54a 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -67,7 +67,7 @@ import android.location.ILocationManager;
import android.location.LocationManager;
import android.media.AudioManager;
import android.media.MediaRouter;
-import android.media.session.MediaSessionManager;
+import android.media.session.SessionManager;
import android.net.ConnectivityManager;
import android.net.IConnectivityManager;
import android.net.INetworkPolicyManager;
@@ -639,7 +639,7 @@ class ContextImpl extends Context {
registerService(MEDIA_SESSION_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {
- return new MediaSessionManager(ctx);
+ return new SessionManager(ctx);
}
});
registerService(TRUST_SERVICE, new ServiceFetcher() {
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index ff92d82..906484a 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -2387,10 +2387,10 @@ public abstract class Context {
/**
* Use with {@link #getSystemService} to retrieve a
- * {@link android.media.session.MediaSessionManager} for managing media Sessions.
+ * {@link android.media.session.SessionManager} for managing media Sessions.
*
* @see #getSystemService
- * @see android.media.session.MediaSessionManager
+ * @see android.media.session.SessionManager
*/
public static final String MEDIA_SESSION_SERVICE = "media_session";
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 606a4b1..66f947b 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2070,6 +2070,14 @@
android:description="@string/permdesc_bindTvInput"
android:protectionLevel="signature|system" />
+ <!-- Must be required by a {@link android.media.routeprovider.RouteProviderService}
+ to ensure that only the system can interact with it.
+ -->
+ <permission android:name="android.permission.BIND_ROUTE_PROVIDER"
+ android:label="@string/permlab_bindRouteProvider"
+ android:description="@string/permdesc_bindRouteProvider"
+ android:protectionLevel="signature" />
+
<!-- Must be required by device administration receiver, to ensure that only the
system can interact with it. -->
<permission android:name="android.permission.BIND_DEVICE_ADMIN"
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index b0e1150..cacb41f 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -1077,6 +1077,12 @@
interface of a widget service. Should never be needed for normal apps.</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_bindRouteProvider">bind to a route provider service</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_bindRouteProvider">Allows the holder to bind to any registered
+ route providers. Should never be needed for normal apps.</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_bindDeviceAdmin">interact with a device admin</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_bindDeviceAdmin">Allows the holder to send intents to