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

am: 0a9ccf2619

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

Change-Id: Ic6530a6b92c26d68a25ab15d24779b5f3f10f35a
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() { 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 // Note: This assumes that the current user can read the profile badge of the
// originating user. // originating user.
return mContext.getPackageManager().getUserBadgeForDensityNoBackground( return mContext.getPackageManager().getUserBadgeForDensityNoBackground(