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

Commit 0e7ee0ac authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Check caller for sending media key to global priority session am:...

Merge "Check caller for sending media key to global priority session am: d409d186 am: 419aeae6 am: e8bc7157"
parents f11be893 b26d4fe1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -767,6 +767,13 @@ public class MediaSessionService extends SystemService implements Monitor {
                            + "setup is in progress.");
                    return;
                }
                if (isGlobalPriorityActive() && uid != Process.SYSTEM_UID) {
                    // Prevent dispatching key event through reflection while the global priority
                    // session is active.
                    Slog.i(TAG, "Only the system can dispatch media key event "
                            + "to the global priority session.");
                    return;
                }

                synchronized (mLock) {
                    // If we don't have a media button receiver to fall back on