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

Commit 2ba952ac authored by Ioana Alexandru's avatar Ioana Alexandru Committed by Android (Google) Code Review
Browse files

Merge "Avoid dividing 0 by 0 in StackScrollAlgorithm." into tm-qpr-dev

parents c5bfa992 3d676a26
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -884,6 +884,9 @@ public class StackScrollAlgorithm {
                childViewState.zTranslation = baseZ;
            } else {
                float factor = (notificationEnd - shelfStart) / shelfHeight;
                if (Float.isNaN(factor)) { // Avoid problems when the above is 0/0.
                    factor = 1.0f;
                }
                factor = Math.min(factor, 1.0f);
                childViewState.zTranslation = baseZ + factor * zDistanceBetweenElements;
            }