Merge "Don't forget to listen for USER_ALL broadcasts." into lmp-mr1-dev

This commit is contained in:
Dan Sandler
2014-12-05 14:27:24 +00:00
committed by Android (Google) Code Review

View File

@@ -683,15 +683,12 @@ public abstract class BaseStatusBar extends SystemUI implements
Log.v(TAG, String.format("%s: current userid: %d, notification userid: %d", Log.v(TAG, String.format("%s: current userid: %d, notification userid: %d",
n, thisUserId, notificationUserId)); n, thisUserId, notificationUserId));
} }
synchronized (mCurrentProfiles) { return isCurrentProfile(notificationUserId);
return notificationUserId == UserHandle.USER_ALL
|| mCurrentProfiles.get(notificationUserId) != null;
}
} }
protected boolean isCurrentProfile(int userId) { protected boolean isCurrentProfile(int userId) {
synchronized (mCurrentProfiles) { synchronized (mCurrentProfiles) {
return mCurrentProfiles.get(userId) != null; return userId == UserHandle.USER_ALL || mCurrentProfiles.get(userId) != null;
} }
} }