summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorRoboErik <epastern@google.com>2014-05-16 16:27:35 -0700
committerRoboErik <epastern@google.com>2014-05-16 16:40:17 -0700
commit42ea7eecd149161ed192d3029f0d77d1d08a4aa5 (patch)
treef3fe1644a6e7d480f5ef07983ca70d9ddef0ac37 /services
parent8a2cfc309ab9126e90022916967c65a793c034f0 (diff)
downloadframeworks_base-42ea7eecd149161ed192d3029f0d77d1d08a4aa5.zip
frameworks_base-42ea7eecd149161ed192d3029f0d77d1d08a4aa5.tar.gz
frameworks_base-42ea7eecd149161ed192d3029f0d77d1d08a4aa5.tar.bz2
Rename session classes to have media prefix, hide routes
This renames several of the core session classes to be prefixed with Media. It also adds @hide to all route references for now. Change-Id: Idb42897d490cf24626e4e93ca975b2cb93ec054c
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/media/MediaRouteProviderProxy.java2
-rw-r--r--services/core/java/com/android/server/media/MediaSessionRecord.java32
-rw-r--r--services/core/java/com/android/server/media/MediaSessionService.java4
-rw-r--r--services/core/java/com/android/server/media/MediaSessionStack.java8
4 files changed, 23 insertions, 23 deletions
diff --git a/services/core/java/com/android/server/media/MediaRouteProviderProxy.java b/services/core/java/com/android/server/media/MediaRouteProviderProxy.java
index 1c5cacd..b31153b 100644
--- a/services/core/java/com/android/server/media/MediaRouteProviderProxy.java
+++ b/services/core/java/com/android/server/media/MediaRouteProviderProxy.java
@@ -26,7 +26,7 @@ import android.media.routeprovider.RouteProviderService;
import android.media.routeprovider.RouteRequest;
import android.media.session.RouteEvent;
import android.media.session.RouteInfo;
-import android.media.session.Session;
+import android.media.session.MediaSession;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
diff --git a/services/core/java/com/android/server/media/MediaSessionRecord.java b/services/core/java/com/android/server/media/MediaSessionRecord.java
index f6be1ff..00d364b 100644
--- a/services/core/java/com/android/server/media/MediaSessionRecord.java
+++ b/services/core/java/com/android/server/media/MediaSessionRecord.java
@@ -24,16 +24,16 @@ import android.media.session.ISessionController;
import android.media.session.ISessionControllerCallback;
import android.media.session.ISession;
import android.media.session.ISessionCallback;
-import android.media.session.SessionController;
-import android.media.session.MediaMetadata;
+import android.media.session.MediaController;
import android.media.session.RouteCommand;
import android.media.session.RouteInfo;
import android.media.session.RouteOptions;
import android.media.session.RouteEvent;
-import android.media.session.Session;
-import android.media.session.SessionInfo;
+import android.media.session.MediaSession;
+import android.media.session.MediaSessionInfo;
import android.media.session.RouteInterface;
import android.media.session.PlaybackState;
+import android.media.MediaMetadata;
import android.media.Rating;
import android.os.Bundle;
import android.os.Handler;
@@ -85,7 +85,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
private final int mOwnerPid;
private final int mOwnerUid;
private final int mUserId;
- private final SessionInfo mSessionInfo;
+ private final MediaSessionInfo mSessionInfo;
private final String mTag;
private final ControllerStub mController;
private final SessionStub mSession;
@@ -120,7 +120,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
mOwnerPid = ownerPid;
mOwnerUid = ownerUid;
mUserId = userId;
- mSessionInfo = new SessionInfo(UUID.randomUUID().toString(), ownerPackageName);
+ mSessionInfo = new MediaSessionInfo(UUID.randomUUID().toString(), ownerPackageName);
mTag = tag;
mController = new ControllerStub();
mSession = new SessionStub();
@@ -130,7 +130,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
}
/**
- * Get the binder for the {@link Session}.
+ * Get the binder for the {@link MediaSession}.
*
* @return The session binder apps talk to.
*/
@@ -139,7 +139,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
}
/**
- * Get the binder for the {@link SessionController}.
+ * Get the binder for the {@link MediaController}.
*
* @return The controller binder apps talk to.
*/
@@ -170,7 +170,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
*
* @return Info that identifies this session.
*/
- public SessionInfo getSessionInfo() {
+ public MediaSessionInfo getSessionInfo() {
return mSessionInfo;
}
@@ -209,7 +209,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
* @return True if this is a system priority session, false otherwise
*/
public boolean isSystemPriority() {
- return (mFlags & Session.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0;
+ return (mFlags & MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0;
}
/**
@@ -221,7 +221,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
public void selectRoute(RouteInfo route) {
synchronized (mLock) {
if (route != mRoute) {
- disconnect(Session.DISCONNECT_REASON_ROUTE_CHANGED);
+ disconnect(MediaSession.DISCONNECT_REASON_ROUTE_CHANGED);
}
mRoute = route;
}
@@ -335,7 +335,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
}
public boolean isTransportControlEnabled() {
- return hasFlag(Session.FLAG_HANDLES_TRANSPORT_CONTROLS);
+ return hasFlag(MediaSession.FLAG_HANDLES_TRANSPORT_CONTROLS);
}
@Override
@@ -353,7 +353,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
return;
}
if (isConnected()) {
- disconnectLocked(Session.DISCONNECT_REASON_SESSION_DESTROYED);
+ disconnectLocked(MediaSession.DISCONNECT_REASON_SESSION_DESTROYED);
}
mRoute = null;
mRequest = null;
@@ -540,7 +540,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
@Override
public void disconnect() {
- MediaSessionRecord.this.disconnect(Session.DISCONNECT_REASON_PROVIDER_DISCONNECTED);
+ MediaSessionRecord.this.disconnect(MediaSession.DISCONNECT_REASON_PROVIDER_DISCONNECTED);
}
};
@@ -569,7 +569,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
@Override
public void setFlags(int flags) {
- if ((flags & Session.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0) {
+ if ((flags & MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0) {
int pid = getCallingPid();
int uid = getCallingUid();
mService.enforcePhoneStatePermission(pid, uid);
@@ -627,7 +627,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
public void disconnectFromRoute(RouteInfo route) {
if (route != null && mRoute != null
&& TextUtils.equals(route.getId(), mRoute.getId())) {
- disconnect(Session.DISCONNECT_REASON_SESSION_DISCONNECTED);
+ disconnect(MediaSession.DISCONNECT_REASON_SESSION_DISCONNECTED);
}
}
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java
index a2ca2a1..d9e45f5ba 100644
--- a/services/core/java/com/android/server/media/MediaSessionService.java
+++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -30,7 +30,7 @@ import android.media.session.ISessionCallback;
import android.media.session.ISessionManager;
import android.media.session.RouteInfo;
import android.media.session.RouteOptions;
-import android.media.session.Session;
+import android.media.session.MediaSession;
import android.os.Binder;
import android.os.Bundle;
import android.os.Handler;
@@ -503,7 +503,7 @@ public class MediaSessionService extends SystemService implements Monitor {
MediaSessionRecord session = mSessions.get(i);
MediaSessionService.this.destroySessionLocked(session);
if (session.isConnected()) {
- session.disconnect(Session.DISCONNECT_REASON_USER_STOPPING);
+ session.disconnect(MediaSession.DISCONNECT_REASON_USER_STOPPING);
}
}
}
diff --git a/services/core/java/com/android/server/media/MediaSessionStack.java b/services/core/java/com/android/server/media/MediaSessionStack.java
index f89b14a..7ba9212 100644
--- a/services/core/java/com/android/server/media/MediaSessionStack.java
+++ b/services/core/java/com/android/server/media/MediaSessionStack.java
@@ -17,7 +17,7 @@
package com.android.server.media;
import android.media.session.PlaybackState;
-import android.media.session.Session;
+import android.media.session.MediaSession;
import android.os.UserHandle;
import java.io.PrintWriter;
@@ -62,7 +62,7 @@ public class MediaSessionStack {
*/
public void addSession(MediaSessionRecord record) {
mSessions.add(record);
- if ((record.getFlags() & Session.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0) {
+ if ((record.getFlags() & MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0) {
mGlobalPrioritySession = record;
}
clearCache();
@@ -134,7 +134,7 @@ public class MediaSessionStack {
public ArrayList<MediaSessionRecord> getTransportControlSessions(int userId) {
if (mCachedTransportControlList == null) {
mCachedTransportControlList = getPriorityListLocked(true,
- Session.FLAG_HANDLES_TRANSPORT_CONTROLS, userId);
+ MediaSession.FLAG_HANDLES_TRANSPORT_CONTROLS, userId);
}
return mCachedTransportControlList;
}
@@ -170,7 +170,7 @@ public class MediaSessionStack {
return mCachedButtonReceiver;
}
ArrayList<MediaSessionRecord> records = getPriorityListLocked(true,
- Session.FLAG_HANDLES_MEDIA_BUTTONS, userId);
+ MediaSession.FLAG_HANDLES_MEDIA_BUTTONS, userId);
if (records.size() > 0) {
mCachedButtonReceiver = records.get(0);
}