Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca58ddf7 authored by RoboErik's avatar RoboErik Committed by Erik Pasternak
Browse files

Fix crash when calling MediaSession callback

bug:16311395
Change-Id: Ice52d2da63933af881dd95fa8c6f59a6fe27e0df
parent 3ee06efe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
        }