diff --git a/api/current.xml b/api/current.xml index 0a234d038a7e8..ad51bdaec70de 100644 --- a/api/current.xml +++ b/api/current.xml @@ -259436,7 +259436,7 @@ deprecated="not deprecated" visibility="public" > - + diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index af3ffe5afbb3f..cc5be00d19e5a 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);