diff options
author | RoboErik <epastern@google.com> | 2014-07-10 13:48:01 -0700 |
---|---|---|
committer | RoboErik <epastern@google.com> | 2014-07-16 12:03:45 -0700 |
commit | 8b4bffcac996b4083e720310a09d315ca1c4a000 (patch) | |
tree | 56726422a371d15b204756f80bce5e487d1ed318 /cmds/media/src | |
parent | 54892c8b813eb2de3c5c6bcd08c90b8dd0abbec8 (diff) | |
download | frameworks_base-8b4bffcac996b4083e720310a09d315ca1c4a000.zip frameworks_base-8b4bffcac996b4083e720310a09d315ca1c4a000.tar.gz frameworks_base-8b4bffcac996b4083e720310a09d315ca1c4a000.tar.bz2 |
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
Diffstat (limited to 'cmds/media/src')
-rw-r--r-- | cmds/media/src/com/android/commands/media/Media.java | 4 |
1 files changed, 2 insertions, 2 deletions
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<IBinder> 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<IBinder> 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(); |