Skip to content

Commit aa99257

Browse files
jsharkeyAndroid (Google) Code Review
authored andcommitted
Merge "Only play notification sounds for active user." into jb-mr1-dev
2 parents 73755c9 + 8637bd9 commit aa99257

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services/java/com/android/server/NotificationManagerService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,8 @@ public void enqueueNotificationInternal(String pkg, int callingUid, int callingP
10331033
if (((mDisabledNotifications & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) == 0)
10341034
&& (!(old != null
10351035
&& (notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0 ))
1036-
&& (r.userId == UserHandle.USER_ALL || r.userId == userId)
1036+
&& (r.userId == UserHandle.USER_ALL ||
1037+
(r.userId == userId && r.userId == ActivityManager.getCurrentUser()))
10371038
&& mSystemReady) {
10381039

10391040
final AudioManager audioManager = (AudioManager) mContext

0 commit comments

Comments
 (0)