Fix IllegalArguemntException for ClipIconView#update
The scale was infinity sometimes which means that the view minSize is probably getting set to 0 due to lp height and width being 0, so we do not update the views as they are no longer laid out
Flag: NONE
Test: Opening apps should work fine, but i wasn't able to repro this exception before or after this fix
Fix: 318099222
Change-Id: I1c08346c7ee1d4e89d9c3ba23ee2aa51a451cb31
diff --git a/src/com/android/launcher3/views/ClipIconView.java b/src/com/android/launcher3/views/ClipIconView.java
index 87e496e..7737adb 100644
--- a/src/com/android/launcher3/views/ClipIconView.java
+++ b/src/com/android/launcher3/views/ClipIconView.java
@@ -112,7 +112,7 @@
float scaleY = rect.height() / minSize;
float scale = Math.max(1f, Math.min(scaleX, scaleY));
- if (Float.isNaN(scale)) {
+ if (Float.isNaN(scale) || Float.isInfinite(scale)) {
// Views are no longer laid out, do not update.
return;
}