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

Commit 31fdc741 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Exclude MediaSession2 from the media button session" into rvc-dev

parents 7feac4ed 9661a45d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2099,7 +2099,7 @@ public class MediaSessionService extends SystemService implements Monitor {
                boolean asSystemService, KeyEvent keyEvent, boolean needWakeLock) {
            if (mCurrentFullUserRecord.getMediaButtonSessionLocked()
                    instanceof MediaSession2Record) {
                // TODO(jaewan): Implement
                // TODO(jaewan): Make MediaSession2 to receive media key event
                return;
            }
            MediaSessionRecord session = null;
+4 −0
Original line number Diff line number Diff line
@@ -244,6 +244,10 @@ class MediaSessionStack {
    private MediaSessionRecordImpl findMediaButtonSession(int uid) {
        MediaSessionRecordImpl mediaButtonSession = null;
        for (MediaSessionRecordImpl session : mSessions) {
            if (session instanceof MediaSession2Record) {
                // TODO(jaewan): Make MediaSession2 to receive media key event
                continue;
            }
            if (uid == session.getUid()) {
                if (session.checkPlaybackActiveState(
                        mAudioPlayerStateMonitor.isPlaybackActive(session.getUid()))) {