am c037282c: Merge "Rebind notification listeners for current user." into jb-mr2-dev

* commit 'c037282c1ca0d7589168c73f1cf8b19ecc3ffca4':
  Rebind notification listeners for current user.
This commit is contained in:
John Spurlock
2013-05-16 11:09:15 -07:00
committed by Android Git Automerger

View File

@ -537,13 +537,14 @@ public class NotificationManagerService extends INotificationManager.Stub
* is altered. (For example in response to USER_SWITCHED in our broadcast receiver)
*/
void rebindListenerServices() {
String flat = Settings.Secure.getString(
final int currentUser = ActivityManager.getCurrentUser();
String flat = Settings.Secure.getStringForUser(
mContext.getContentResolver(),
Settings.Secure.ENABLED_NOTIFICATION_LISTENERS);
Settings.Secure.ENABLED_NOTIFICATION_LISTENERS,
currentUser);
NotificationListenerInfo[] toRemove = new NotificationListenerInfo[mListeners.size()];
final ArrayList<ComponentName> toAdd;
final int currentUser = ActivityManager.getCurrentUser();
synchronized (mNotificationList) {
// unbind and remove all existing listeners