Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a682a5d8 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

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

Bug: 24585203
Change-Id: I3d328d0e1fe81d2704bb5b9d4b340a367bfb9249
parent 1845049c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.