* commit '39de779d3078cbab7ca9af2dce8131ef8b5dd660': Clear identity when requesting current user.
This commit is contained in:
@@ -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 we're not supposed to beep, vibrate, etc. then don't.
|
||||||
if (((mDisabledNotifications & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) == 0)
|
if (((mDisabledNotifications & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) == 0)
|
||||||
&& (!(old != null
|
&& (!(old != null
|
||||||
&& (notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0 ))
|
&& (notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0 ))
|
||||||
&& (r.userId == UserHandle.USER_ALL ||
|
&& (r.userId == UserHandle.USER_ALL ||
|
||||||
(r.userId == userId && r.userId == ActivityManager.getCurrentUser()))
|
(r.userId == userId && r.userId == currentUser))
|
||||||
&& mSystemReady) {
|
&& mSystemReady) {
|
||||||
|
|
||||||
final AudioManager audioManager = (AudioManager) mContext
|
final AudioManager audioManager = (AudioManager) mContext
|
||||||
|
|||||||
Reference in New Issue
Block a user