Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8637bd97 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Only play notification sounds for active user.

Bug: 7298302
Change-Id: I1e176f7b17bb51b878f2e8b345804780df92d487
parent 26bf1a7c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1033,7 +1033,8 @@ public class NotificationManagerService extends INotificationManager.Stub
            if (((mDisabledNotifications & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) == 0)
                    && (!(old != null
                        && (notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0 ))
                    && (r.userId == UserHandle.USER_ALL || r.userId == userId)
                    && (r.userId == UserHandle.USER_ALL ||
                        (r.userId == userId && r.userId == ActivityManager.getCurrentUser()))
                    && mSystemReady) {

                final AudioManager audioManager = (AudioManager) mContext