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

Commit 8f09aa34 authored by Jon Miranda's avatar Jon Miranda
Browse files

Fix IllegalArgumentException for Float.NaN in ClipIconView.

Bug: 173703326
Test: not able to repo bug but this prevents the code from
      executing in bad case
Change-Id: I3701c040e72e6ce37a624b10bb82b2200935e283
parent b1850140
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -161,6 +161,11 @@ public class ClipIconView extends View implements ClipPathView {
        float scaleY = rect.height() / minSize;
        float scale = Math.max(1f, Math.min(scaleX, scaleY));

        if (Float.isNaN(scale)) {
            // Views are no longer laid out, do not update.
            return;
        }

        update(rect, progress, shapeProgressStart, cornerRadius, isOpening, scale,
                minSize, lp, isVerticalBarLayout, dp);