Prevent recursive draw-invalidate cycle when drawing folder

Change-Id: I4d3e680ee0cd1af9da997ac92c505ca38ee4e810
diff --git a/src/com/android/launcher3/folder/FolderIcon.java b/src/com/android/launcher3/folder/FolderIcon.java
index b6f05f3..48d8e10 100644
--- a/src/com/android/launcher3/folder/FolderIcon.java
+++ b/src/com/android/launcher3/folder/FolderIcon.java
@@ -510,6 +510,10 @@
         Drawable d = params.drawable;
 
         if (d != null) {
+            // Remove the callback to prevent invalidate as a result of property changes
+            Drawable.Callback cb = d.getCallback();
+            d.setCallback(null);
+
             mTempBounds.set(d.getBounds());
             d.setBounds(0, 0, mIntrinsicIconSize, mIntrinsicIconSize);
             boolean isPreloadIcon = d instanceof PreloadIconDrawable;
@@ -523,6 +527,7 @@
                 d.clearColorFilter();
             }
             d.setBounds(mTempBounds);
+            d.setCallback(cb);
         }
         canvas.restore();
     }