summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2011-01-04 13:58:54 -0800
committerGilles Debunne <debunne@google.com>2011-01-10 10:00:37 -0800
commitb0db5940c9c444d79f0bcae6526f390a99c01037 (patch)
treebb1655740f34b7475e1b81a0ea674cf511bd35ca /core/java/android
parentb74e32cc7ded9b26c1ba1e1bcff98fc9e7128562 (diff)
Fix for an NPE in Account settings on long press.
Bug 3333512 Change-Id: Ief79e824b86b964598f00ef74c6b5c61c0730242
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/widget/TextView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index af3ffe5afbb3..cc5be00d19e5 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -7854,7 +7854,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
MenuHandler handler = new MenuHandler();
- if (mText instanceof Spanned) {
+ if (mText instanceof Spanned && hasSelectionController()) {
long lastTouchOffset = getLastTouchOffsets();
final int selStart = extractRangeStartFromLong(lastTouchOffset);
final int selEnd = extractRangeEndFromLong(lastTouchOffset);