Merge "Never fetch notification badges for USER_SYSTEM" into nyc-dev am: 0a9ccf2619

am: 66bd6bca16

* commit '66bd6bca16560eebf1968dd4ae59f405a7604484':
  Never fetch notification badges for USER_SYSTEM

Change-Id: Ie47a291ef3b7211dbf422b9866468588f4b9e939
This commit is contained in:
Chris Wren
2016-05-23 17:53:28 +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(