OSDN Git Service

Add toString() methods to BitmapWithColors class.
authorDanny Baumann <dannybaumann@web.de>
Wed, 27 Apr 2016 11:32:53 +0000 (13:32 +0200)
committerDanny Baumann <dannybaumann@web.de>
Wed, 27 Apr 2016 11:32:53 +0000 (13:32 +0200)
Eases debugging.

Change-Id: I34d4d0ae888f4768232fd8a526a47111720d1faf

src/com/cyanogenmod/eleven/utils/BitmapWithColors.java

index aaa46f5..7c30354 100644 (file)
@@ -56,6 +56,14 @@ public class BitmapWithColors {
             }
             return dominant;
         }
+
+        @Override
+        public String toString() {
+            return "BitmapColors[vibrant=" + Integer.toHexString(mVibrantColor)
+                    + ", vibrantDark=" + Integer.toHexString(mVibrantDarkColor)
+                    + ", vibrantLight=" + Integer.toHexString(mVibrantLightColor)
+                    + ", dominant=" + Integer.toHexString(mDominantColor) + "]";
+        }
     }
 
     private static final int CACHE_SIZE_MAX = 20;
@@ -183,4 +191,9 @@ public class BitmapWithColors {
             sCachedColors.put(mBitmapKey, mColors);
         }
     }
+
+    @Override
+    public String toString() {
+        return "BitmapWithColors[key=" + mBitmapKey + ", colors=" + mColors + "]";
+    }
 }