summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/PendingAppWidgetHostView.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-10-01 19:35:03 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-10-01 19:36:59 -0700
commita682a5d8c747ac9cbbe10fb791a0548863422270 (patch)
tree44f3885fd7149819b92440243cce5fdc5d3fd9e4 /src/com/android/launcher3/PendingAppWidgetHostView.java
parent1845049c6652a43bd3e95fe01748d24949e9fc06 (diff)
downloadandroid_packages_apps_Trebuchet-a682a5d8c747ac9cbbe10fb791a0548863422270.tar.gz
android_packages_apps_Trebuchet-a682a5d8c747ac9cbbe10fb791a0548863422270.tar.bz2
android_packages_apps_Trebuchet-a682a5d8c747ac9cbbe10fb791a0548863422270.zip
Make sure that the dimensions are not negative when drawing pending widget
Bug: 24585203 Change-Id: I3d328d0e1fe81d2704bb5b9d4b340a367bfb9249
Diffstat (limited to 'src/com/android/launcher3/PendingAppWidgetHostView.java')
-rw-r--r--src/com/android/launcher3/PendingAppWidgetHostView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/PendingAppWidgetHostView.java b/src/com/android/launcher3/PendingAppWidgetHostView.java
index 1d7694598..85d8658a6 100644
--- a/src/com/android/launcher3/PendingAppWidgetHostView.java
+++ b/src/com/android/launcher3/PendingAppWidgetHostView.java
@@ -218,7 +218,7 @@ public class PendingAppWidgetHostView extends LauncherAppWidgetHostView implemen
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.