Merge "hasBadge() in FastBitmapDrawable to check if badge exists." into main
diff --git a/iconloaderlib/src/com/android/launcher3/icons/FastBitmapDrawable.java b/iconloaderlib/src/com/android/launcher3/icons/FastBitmapDrawable.java
index 849a2ae..fa5d5fd 100644
--- a/iconloaderlib/src/com/android/launcher3/icons/FastBitmapDrawable.java
+++ b/iconloaderlib/src/com/android/launcher3/icons/FastBitmapDrawable.java
@@ -17,6 +17,7 @@
 package com.android.launcher3.icons;
 
 import static com.android.launcher3.icons.BaseIconFactory.getBadgeSizeForIconSize;
+import static com.android.launcher3.icons.BitmapInfo.FLAG_NO_BADGE;
 import static com.android.launcher3.icons.BitmapInfo.FLAG_THEMED;
 import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
 
@@ -338,6 +339,11 @@
         return getDisabledColorFilter(1);
     }
 
+    // Returns if the FastBitmapDrawable contains a badge.
+    public boolean hasBadge() {
+        return (mCreationFlags & FLAG_NO_BADGE) == 0;
+    }
+
     private static ColorFilter getDisabledColorFilter(float disabledAlpha) {
         ColorMatrix tempBrightnessMatrix = new ColorMatrix();
         ColorMatrix tempFilterMatrix = new ColorMatrix();