am 1b400c77: Merge "Fix for NPE in TextView." into gingerbread

Merge commit '1b400c7763e63505bafd496953764c3e97c2be5b' into gingerbread-plus-aosp

* commit '1b400c7763e63505bafd496953764c3e97c2be5b':
  Fix for NPE in TextView.
This commit is contained in:
Gilles Debunne
2010-08-26 11:01:34 -07:00
committed by Android Git Automerger

View File

@@ -7122,6 +7122,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
int selectionStart, selectionEnd;
// selectionModifierCursorController is not null at that point
SelectionModifierCursorController selectionModifierCursorController =
((SelectionModifierCursorController) mSelectionModifierCursorController);
int minOffset = selectionModifierCursorController.getMinTouchOffset();
@@ -7145,6 +7146,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
private String getWordForDictionary() {
if (mSelectionModifierCursorController == null) {
return null;
}
int offset = ((SelectionModifierCursorController) mSelectionModifierCursorController).
getMinTouchOffset();