Fixing null check when calling mutateOnMainThread
am: 1ba7e36cc8
* commit '1ba7e36cc8901b34b91d06fdc868a63f9a8fad2d':
Fixing null check when calling mutateOnMainThread
diff --git a/src/com/android/launcher3/WidgetPreviewLoader.java b/src/com/android/launcher3/WidgetPreviewLoader.java
index 603b072..10c1053 100644
--- a/src/com/android/launcher3/WidgetPreviewLoader.java
+++ b/src/com/android/launcher3/WidgetPreviewLoader.java
@@ -428,8 +428,9 @@
float iconScale = Math.min((float) smallestSide / (appIconSize + 2 * minOffset), scale);
try {
- Drawable icon = mutateOnMainThread(mManager.loadIcon(info, mIconCache));
+ Drawable icon = mManager.loadIcon(info, mIconCache);
if (icon != null) {
+ icon = mutateOnMainThread(icon);
int hoffset = (int) ((tileW - appIconSize * iconScale) / 2) + x;
int yoffset = (int) ((tileH - appIconSize * iconScale) / 2);
icon.setBounds(hoffset, yoffset,