Merge "Fix for an NPE in TextView." into gingerbread
This commit is contained in:
committed by
Android (Google) Code Review
commit
e2978c8dca
@@ -6469,10 +6469,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
if (!mFrozenWithFocus || (selStart < 0 || selEnd < 0)) {
|
||||
boolean selMoved = mSelectionMoved;
|
||||
|
||||
final int touchOffset =
|
||||
((SelectionModifierCursorController) mSelectionModifierCursorController).
|
||||
getMinTouchOffset();
|
||||
Selection.setSelection((Spannable) mText, touchOffset);
|
||||
if (mSelectionModifierCursorController != null) {
|
||||
final int touchOffset =
|
||||
((SelectionModifierCursorController) mSelectionModifierCursorController).
|
||||
getMinTouchOffset();
|
||||
Selection.setSelection((Spannable) mText, touchOffset);
|
||||
}
|
||||
|
||||
if (mMovement != null) {
|
||||
mMovement.onTakeFocus(this, (Spannable) mText, direction);
|
||||
|
||||
Reference in New Issue
Block a user