commit | f87e8513ce55303168acd9c698acd5bbd33b9bad | [log] [tgz] |
---|---|---|
author | RoboErik <epastern@google.com> | Tue Jul 15 17:25:24 2014 -0700 |
committer | RoboErik <epastern@google.com> | Wed Jul 16 11:11:39 2014 -0700 |
tree | 8fb244729ff25ab7cb95df1aa45198944a19fca4 | |
parent | b1dbd65b4e8ce2c889381214d0bc44aff8dfe616 [diff] |
Update MediaSession/Controller constructors part of API change Change-Id: Ia1f4222e256b398c35390827fc7c7c5b60ab88b1
diff --git a/v4/api21/android/support/v4/media/session/MediaControllerCompatApi21.java b/v4/api21/android/support/v4/media/session/MediaControllerCompatApi21.java index 6f54512..44d6ea8 100644 --- a/v4/api21/android/support/v4/media/session/MediaControllerCompatApi21.java +++ b/v4/api21/android/support/v4/media/session/MediaControllerCompatApi21.java
@@ -28,7 +28,7 @@ class MediaControllerCompatApi21 { public static Object fromToken(Object sessionToken) { - return MediaController.fromToken((MediaSession.Token)sessionToken); + return new MediaController((MediaSession.Token) sessionToken); } public static Object createCallback(Callback callback) {
diff --git a/v4/api21/android/support/v4/media/session/MediaSessionCompatApi21.java b/v4/api21/android/support/v4/media/session/MediaSessionCompatApi21.java index fcaa190..c1958ec 100644 --- a/v4/api21/android/support/v4/media/session/MediaSessionCompatApi21.java +++ b/v4/api21/android/support/v4/media/session/MediaSessionCompatApi21.java
@@ -31,9 +31,7 @@ class MediaSessionCompatApi21 { public static Object createSession(Context context, String tag) { - MediaSessionManager mgr = (MediaSessionManager)context.getSystemService( - Context.MEDIA_SESSION_SERVICE); - return mgr.createSession(tag); + return new MediaSession(context, tag); } public static Object createCallback(Callback callback) {