From 1f7a580f22f8a3406ad1896d234163ead1a97088 Mon Sep 17 00:00:00 2001 From: "heechul.hyun" Date: Thu, 25 Jun 2015 14:00:20 +0900 Subject: [PATCH] Media button intent should be send to current user only. If it broadcast to all users, it could make the following issues. 1. Connect Headset 2. Run Music application and play music contents. 3. Stop music. 4. Switch user to 'guest'. 5. Enter the Settings-Apps-Google Play Music and press 'Force stop' button. 6. Press media button on the headphone. After press media button on the headphone, even though the 'guest' mode, the music is played of owner's contents and application. Bug 22128930 Change-Id: I8e8bf6e81a0f72c123ed03f902f3b5afe3a867f8 --- .../core/java/com/android/server/media/MediaSessionService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java index 80864610636eb..7028fa6695f66 100644 --- a/services/core/java/com/android/server/media/MediaSessionService.java +++ b/services/core/java/com/android/server/media/MediaSessionService.java @@ -988,7 +988,7 @@ public class MediaSessionService extends SystemService implements Monitor { keyIntent.putExtra(EXTRA_WAKELOCK_ACQUIRED, WAKELOCK_RELEASE_ON_FINISHED); } - getContext().sendOrderedBroadcastAsUser(keyIntent, UserHandle.ALL, + getContext().sendOrderedBroadcastAsUser(keyIntent, UserHandle.CURRENT, null, mKeyEventDone, mHandler, Activity.RESULT_OK, null, null); } }