am a682a5d8: Make sure that the dimensions are not negative when drawing pending widget
* commit 'a682a5d8c747ac9cbbe10fb791a0548863422270':
Make sure that the dimensions are not negative when drawing pending widget
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.