Merge "Rebind notification listeners for current user." into jb-mr2-dev
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index fac1fe8..f9b6eba 100644
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -537,13 +537,14 @@
* 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