diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2012-10-10 15:36:30 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-10 15:36:30 -0700 |
commit | f864401cfa1fdf863003f9d2d624fd742f7b5f4b (patch) | |
tree | 3af6881fd0bc1cee5164695085da6a65a80de980 /services/java/com/android | |
parent | c1940167109098b5748cde025e49575c6515e490 (diff) | |
parent | c31ed39e7a5a8c709aa5f356cb5bcb563b059d65 (diff) | |
download | frameworks_base-f864401cfa1fdf863003f9d2d624fd742f7b5f4b.zip frameworks_base-f864401cfa1fdf863003f9d2d624fd742f7b5f4b.tar.gz frameworks_base-f864401cfa1fdf863003f9d2d624fd742f7b5f4b.tar.bz2 |
Merge changes I00665385,Ic76db232 into jb-mr1-dev
* changes:
Send accessibility notification events only for the current user.
No sound produced on global actions dialog pops up if no vibrator is present.
Diffstat (limited to 'services/java/com/android')
-rwxr-xr-x | services/java/com/android/server/NotificationManagerService.java | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java index 85b488c..93ae029 100755 --- a/services/java/com/android/server/NotificationManagerService.java +++ b/services/java/com/android/server/NotificationManagerService.java @@ -991,6 +991,14 @@ public class NotificationManagerService extends INotificationManager.Stub | Notification.FLAG_NO_CLEAR; } + final int currentUser; + final long token = Binder.clearCallingIdentity(); + try { + currentUser = ActivityManager.getCurrentUser(); + } finally { + Binder.restoreCallingIdentity(token); + } + if (notification.icon != 0) { final StatusBarNotification n = new StatusBarNotification( pkg, id, tag, r.uid, r.initialPid, score, notification, user); @@ -1015,7 +1023,10 @@ public class NotificationManagerService extends INotificationManager.Stub Binder.restoreCallingIdentity(identity); } } - sendAccessibilityEvent(notification, pkg); + // Send accessibility events only for the current user. + if (currentUser == userId) { + sendAccessibilityEvent(notification, pkg); + } } else { Slog.e(TAG, "Ignoring notification with icon==0: " + notification); if (old != null && old.statusBarKey != null) { @@ -1029,14 +1040,6 @@ 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 |