DO NOT MERGE Check caller for sending media key to global priority session

am: 09c3df004b

Change-Id: Ib883850c8554fae35e29313e2ea6a19e3592148c
This commit is contained in:
Jaewan Kim
2016-09-21 22:53:59 +00:00
committed by android-build-merger

View File

@@ -765,6 +765,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