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

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

Merge "Fix for an NPE in TextView." into gingerbread

parents b1bbe99a 4e765e00
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);