From 8b4bffcac996b4083e720310a09d315ca1c4a000 Mon Sep 17 00:00:00 2001 From: RoboErik Date: Thu, 10 Jul 2014 13:48:01 -0700 Subject: Make MediaSession and MediaController constructors public This makes the MediaSession/Controller constructors public and registers with the system behind the scenes. This also adds a bit about needing to call setActive(true) to start receiving commands in MediaSession's docs. Change-Id: If882d229b54c36bf0831aca0255052dda667a2bc --- cmds/media/src/com/android/commands/media/Media.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmds/media/src') diff --git a/cmds/media/src/com/android/commands/media/Media.java b/cmds/media/src/com/android/commands/media/Media.java index 800b925..c771f65 100644 --- a/cmds/media/src/com/android/commands/media/Media.java +++ b/cmds/media/src/com/android/commands/media/Media.java @@ -114,7 +114,7 @@ public class Media extends BaseCommand { List sessions = mSessionService .getSessions(null, ActivityManager.getCurrentUser()); for (IBinder session : sessions) { - MediaController controller = MediaController.fromBinder(ISessionController.Stub + MediaController controller = new MediaController(ISessionController.Stub .asInterface(session)); if (controller != null && controller.getSessionInfo().getId().equals(id)) { ControllerMonitor monitor = new ControllerMonitor(controller); @@ -248,7 +248,7 @@ public class Media extends BaseCommand { List sessions = mSessionService .getSessions(null, ActivityManager.getCurrentUser()); for (IBinder session : sessions) { - MediaController controller = MediaController.fromBinder(ISessionController.Stub + MediaController controller = new MediaController(ISessionController.Stub .asInterface(session)); if (controller != null) { MediaSessionInfo info = controller.getSessionInfo(); -- cgit v1.1