Skip to content

Commit 24518e4

Browse files
committed
Do not play sounds or vibes for background users' notifications.
USER_ALL notifications will still play/vibe for any user. Change-Id: Ie8cc69bd1541193ed9c4207ef38a8d4898af0a9d
1 parent e94831e commit 24518e4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,7 @@ public void enqueueNotificationInternal(String pkg, int callingUid, int callingP
10471047
if (((mDisabledNotifications & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) == 0)
10481048
&& (!(old != null
10491049
&& (notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0 ))
1050+
&& (r.userId == UserHandle.USER_ALL || r.userId == userId)
10501051
&& mSystemReady) {
10511052

10521053
final AudioManager audioManager = (AudioManager) mContext

0 commit comments

Comments
 (0)