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

Commit 161d9cf9 authored by Gilles Debunne's avatar Gilles Debunne Committed by Android (Google) Code Review
Browse files

Merge "Invalidate text display list on scroll"

parents fa73c1fd 6382ade0
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -8280,9 +8280,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
    @Override
    protected void onScrollChanged(int horiz, int vert, int oldHoriz, int oldVert) {
        super.onScrollChanged(horiz, vert, oldHoriz, oldVert);
        if (mEditor != null && getEditor().mPositionListener != null) {
        if (mEditor != null) {
            if (getEditor().mPositionListener != null) {
                getEditor().mPositionListener.onScrollChanged();
            }
            getEditor().mTextDisplayListIsValid = false;
        }
    }

    /**
@@ -10690,9 +10693,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                return;
            }

            if (offset != mPreviousOffset || parentScrolled) {
            boolean offsetChanged = offset != mPreviousOffset;
            if (offsetChanged || parentScrolled) {
                if (offsetChanged) {
                    updateSelection(offset);
                    addPositionToTouchUpFilter(offset);
                }
                final int line = mLayout.getLineForOffset(offset);

                mPositionX = (int) (mLayout.getPrimaryHorizontal(offset) - 0.5f - mHotspotX);