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

Commit 39de779d authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android Git Automerger
Browse files

am d7eece34: Merge "Clear identity when requesting current user." into jb-mr1-dev

* commit 'd7eece34':
  Clear identity when requesting current user.
parents 8052e88e d7eece34
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1029,12 +1029,20 @@ public class NotificationManagerService extends INotificationManager.Stub
                }
            }

            final int currentUser;
            final long token = Binder.clearCallingIdentity();
            try {
                currentUser = ActivityManager.getCurrentUser();
            } finally {
                Binder.restoreCallingIdentity(token);
            }

            // If we're not supposed to beep, vibrate, etc. then don't.
            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 == ActivityManager.getCurrentUser()))
                        (r.userId == userId && r.userId == currentUser))
                    && mSystemReady) {

                final AudioManager audioManager = (AudioManager) mContext