summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget/TextView.java
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2010-08-24 14:25:57 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-24 14:25:57 -0700
commitb32d0f23a82452d6f7fa8c513e179f1287621905 (patch)
tree163697a4fe9c9db81f87e9f3e050b99d33d88fd0 /core/java/android/widget/TextView.java
parent6cf1a8bfb04aead9cee5f59df4529a79c0a92dca (diff)
parente2978c8dcafdf20c2b49999ec423cb5f76d4a583 (diff)
downloadframeworks_base-b32d0f23a82452d6f7fa8c513e179f1287621905.zip
frameworks_base-b32d0f23a82452d6f7fa8c513e179f1287621905.tar.gz
frameworks_base-b32d0f23a82452d6f7fa8c513e179f1287621905.tar.bz2
am e2978c8d: Merge "Fix for an NPE in TextView." into gingerbread
Merge commit 'e2978c8dcafdf20c2b49999ec423cb5f76d4a583' into gingerbread-plus-aosp * commit 'e2978c8dcafdf20c2b49999ec423cb5f76d4a583': Fix for an NPE in TextView.
Diffstat (limited to 'core/java/android/widget/TextView.java')
-rw-r--r--core/java/android/widget/TextView.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 9159416..d9d5259 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -6474,10 +6474,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);