Merge "Never fetch notification badges for USER_SYSTEM" into nyc-dev

am: 0a9ccf2619

* commit '0a9ccf26192bc5a6fd74afb7afd4834b08230299':
  Never fetch notification badges for USER_SYSTEM

Change-Id: I0e4bd4aaf4c6513c289ca948f63c5bc5c3c7ed02
This commit is contained in:
Chris Wren
2016-05-23 17:47:29 +00:00
committed by android-build-merger

View File

@@ -3106,6 +3106,11 @@ public class Notification implements Parcelable
}
private Drawable getProfileBadgeDrawable() {
if (mContext.getUserId() == UserHandle.USER_SYSTEM) {
// This user can never be a badged profile,
// and also includes USER_ALL system notifications.
return null;
}
// Note: This assumes that the current user can read the profile badge of the
// originating user.
return mContext.getPackageManager().getUserBadgeForDensityNoBackground(