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

Commit 15e91454 authored by Adam Cohen's avatar Adam Cohen Committed by Android (Google) Code Review
Browse files

Merge "Fixing StackView rendering bug exposed by recent Launcher change"

parents eaa867a3 b7f4d030
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -869,21 +869,19 @@ public class StackView extends AdapterViewAnimator {
            View p = v;
            if (!(v.getParent() != null && v.getParent() instanceof View)) return;

            View gp = (View) v.getParent();
            boolean firstPass = true;
            parentRect.set(0, 0, 0, 0);
            int depth = 0;
            while (gp.getParent() != null && gp.getParent() instanceof View
            while (p.getParent() != null && p.getParent() instanceof View
                    && !parentRect.contains(r)) {
                if (!firstPass) {
                    r.offset(p.getLeft() - gp.getScrollX(), p.getTop() - gp.getScrollY());
                    r.offset(p.getLeft() - p.getScrollX(), p.getTop() - p.getScrollY());
                    depth++;
                }
                firstPass = false;
                p = (View) p.getParent();
                gp = (View) p.getParent();
                parentRect.set(p.getLeft() - gp.getScrollX(), p.getTop() - gp.getScrollY(),
                        p.getRight() - gp.getScrollX(), p.getBottom() - gp.getScrollY());
                parentRect.set(p.getScrollX(), p.getScrollY(),
                               p.getWidth() + p.getScrollX(), p.getHeight() + p.getScrollY());

                // TODO: we need to stop early here if we've hit the edge of the screen
                // so as to prevent us from walking too high in the hierarchy. A lot of this