mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +00:00
Make sure that the dimensions are not negative when drawing pending widget
Bug: 24585203 Change-Id: I3d328d0e1fe81d2704bb5b9d4b340a367bfb9249
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user