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

Commit 4fddad17 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi Committed by Android Git Automerger
Browse files

am e20b22fe: Merge "Fix: Drag handle isn\'t updated after crossing bidi boundary." into mnc-dev

* commit 'e20b22fe':
  Fix: Drag handle isn't updated after crossing bidi boundary.
parents 8cf86806 e20b22fe
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3426,9 +3426,13 @@ public class Editor {
        protected void updateDrawable() {
            final int offset = getCurrentCursorOffset();
            final boolean isRtlCharAtOffset = mTextView.getLayout().isRtlCharAt(offset);
            final Drawable oldDrawable = mDrawable;
            mDrawable = isRtlCharAtOffset ? mDrawableRtl : mDrawableLtr;
            mHotspotX = getHotspotX(mDrawable, isRtlCharAtOffset);
            mHorizontalGravity = getHorizontalGravity(isRtlCharAtOffset);
            if (oldDrawable != mDrawable) {
                postInvalidate();
            }
        }

        protected abstract int getHotspotX(Drawable drawable, boolean isRtlRun);