diff options
author | RoboErik <epastern@google.com> | 2014-07-17 18:26:21 -0700 |
---|---|---|
committer | Erik Pasternak <roboerik@android.com> | 2014-07-18 01:40:09 +0000 |
commit | ca58ddf7c82dd0857de0c3d49d7eb87a842ee4ce (patch) | |
tree | 08784280deeedbb069daa13cab3d08862d80e5ff /media/java | |
parent | 3ee06efef34b7f619b6b31b58447c64eda9fc0e7 (diff) | |
download | frameworks_base-ca58ddf7c82dd0857de0c3d49d7eb87a842ee4ce.zip frameworks_base-ca58ddf7c82dd0857de0c3d49d7eb87a842ee4ce.tar.gz frameworks_base-ca58ddf7c82dd0857de0c3d49d7eb87a842ee4ce.tar.bz2 |
Fix crash when calling MediaSession callback
bug:16311395
Change-Id: Ice52d2da63933af881dd95fa8c6f59a6fe27e0df
Diffstat (limited to 'media/java')
-rw-r--r-- | media/java/android/media/session/MediaSession.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/java/android/media/session/MediaSession.java b/media/java/android/media/session/MediaSession.java index 4841360..086cd23 100644 --- a/media/java/android/media/session/MediaSession.java +++ b/media/java/android/media/session/MediaSession.java @@ -154,7 +154,7 @@ public final class MediaSession { if (TextUtils.isEmpty(tag)) { throw new IllegalArgumentException("tag cannot be null or empty"); } - mCbStub = new CallbackStub(); + mCbStub = new CallbackStub(this); MediaSessionManager manager = (MediaSessionManager) context .getSystemService(Context.MEDIA_SESSION_SERVICE); try { @@ -769,7 +769,7 @@ public final class MediaSession { public static class CallbackStub extends ISessionCallback.Stub { private WeakReference<MediaSession> mMediaSession; - public void setMediaSession(MediaSession session) { + public CallbackStub(MediaSession session) { mMediaSession = new WeakReference<MediaSession>(session); } |