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

Commit 5d8f9dd3 authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am 99f0f367: am 4258bfb7: Merge "Fix some drawing artifacts/bugs around...

am 99f0f367: am 4258bfb7: Merge "Fix some drawing artifacts/bugs around overlays/text anchors" into gingerbread

Merge commit '99f0f367'

* commit '99f0f367':
  Fix some drawing artifacts/bugs around overlays/text anchors
parents a2135836 99f0f367
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -4066,10 +4066,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
            for (int i = 0; i < childCount; i++) {
                final View child = getChildAt(i);
                if (child.isOverlayEnabled()) {
                    canvas.translate(child.mLeft + child.mScrollX, child.mTop + child.mScrollY);
                    canvas.translate(child.mLeft - child.mScrollX, child.mTop - child.mScrollY);
                    child.onDrawOverlay(canvas);
                    canvas.translate(-(child.mLeft + child.mScrollX),
                            -(child.mTop + child.mScrollY));
                    canvas.translate(-(child.mLeft - child.mScrollX),
                            -(child.mTop - child.mScrollY));
                }
            }
        }
+10 −2
Original line number Diff line number Diff line
@@ -7814,8 +7814,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
            bounds.bottom = bounds.top + drawableHeight;

            convertFromViewportToContentCoordinates(bounds);
            invalidate();
            mDrawable.setBounds(bounds);
            postInvalidate();
            invalidate();
        }

        boolean hasFingerOn(float x, float y) {
@@ -7832,9 +7833,16 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
            return Rect.intersects(mDrawable.getBounds(), fingerRect);
        }

        void invalidate() {
            final Rect bounds = mDrawable.getBounds();
            TextView.this.invalidate(bounds.left, bounds.top,
                    bounds.right, bounds.bottom);
        }

        void postInvalidate() {
            final Rect bounds = mDrawable.getBounds();
            TextView.this.postInvalidate(bounds.left, bounds.top, bounds.right, bounds.bottom);
            TextView.this.postInvalidate(bounds.left, bounds.top,
                    bounds.right, bounds.bottom);
        }

        void postInvalidateDelayed(long delay) {