Make sure that the dimensions are not negative when drawing pending widget

Bug: 24585203
Change-Id: I3d328d0e1fe81d2704bb5b9d4b340a367bfb9249
diff --git a/src/com/android/launcher3/PendingAppWidgetHostView.java b/src/com/android/launcher3/PendingAppWidgetHostView.java
index 1d76945..85d8658 100644
--- a/src/com/android/launcher3/PendingAppWidgetHostView.java
+++ b/src/com/android/launcher3/PendingAppWidgetHostView.java
@@ -218,7 +218,7 @@
             mRect.offsetTo((getWidth() - mRect.width()) / 2, (getHeight() - mRect.height()) / 2);
             mCenterDrawable.setBounds(mRect);
         } else  {
-            float iconSize = Math.min(availableWidth, availableHeight);
+            float iconSize = Math.max(0, Math.min(availableWidth, availableHeight));
 
             // Use twice the setting size factor, as the setting is drawn at a corner and the
             // icon is drawn in the center.