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

Commit 4e765e00 authored by Gilles Debunne's avatar Gilles Debunne
Browse files

Fix for an NPE in TextView.

Change-Id: I0fca8f839cd444d9b70174078063efff5be499a3
parent 2703a42d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -6469,10 +6469,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
            if (!mFrozenWithFocus || (selStart < 0 || selEnd < 0)) {
                boolean selMoved = mSelectionMoved;

                if (mSelectionModifierCursorController != null) {
                    final int touchOffset = 
                        ((SelectionModifierCursorController) mSelectionModifierCursorController).
                        getMinTouchOffset();
                    Selection.setSelection((Spannable) mText, touchOffset);
                }

                if (mMovement != null) {
                    mMovement.onTakeFocus(this, (Spannable) mText, direction);