Loading services/core/java/com/android/server/media/MediaSessionService.java +12 −9 Original line number Diff line number Diff line Loading @@ -801,16 +801,17 @@ 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. synchronized (mLock) { boolean isGlobalPriorityActive = mPriorityStack.isGlobalPriorityActive(); 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 (!isGlobalPriorityActive() && isVoiceKey(keyEvent.getKeyCode())) { if (!isGlobalPriorityActive && isVoiceKey(keyEvent.getKeyCode())) { handleVoiceKeyEventLocked(keyEvent, needWakeLock); } else { dispatchMediaKeyEventLocked(keyEvent, needWakeLock, true); Loading Loading @@ -1080,8 +1081,10 @@ public class MediaSessionService extends SystemService implements Monitor { @Override public boolean isGlobalPriorityActive() { synchronized (mLock) { return mPriorityStack.isGlobalPriorityActive(); } } @Override public void dump(FileDescriptor fd, final PrintWriter pw, String[] args) { Loading Loading
services/core/java/com/android/server/media/MediaSessionService.java +12 −9 Original line number Diff line number Diff line Loading @@ -801,16 +801,17 @@ 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. synchronized (mLock) { boolean isGlobalPriorityActive = mPriorityStack.isGlobalPriorityActive(); 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 (!isGlobalPriorityActive() && isVoiceKey(keyEvent.getKeyCode())) { if (!isGlobalPriorityActive && isVoiceKey(keyEvent.getKeyCode())) { handleVoiceKeyEventLocked(keyEvent, needWakeLock); } else { dispatchMediaKeyEventLocked(keyEvent, needWakeLock, true); Loading Loading @@ -1080,8 +1081,10 @@ public class MediaSessionService extends SystemService implements Monitor { @Override public boolean isGlobalPriorityActive() { synchronized (mLock) { return mPriorityStack.isGlobalPriorityActive(); } } @Override public void dump(FileDescriptor fd, final PrintWriter pw, String[] args) { Loading