diff options
| author | Sally Yuen <sallyyuen@google.com> | 2022-04-01 18:14:37 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2022-04-01 18:14:37 +0000 |
| commit | b9d928eae337762d197510e17cc4954464d47883 (patch) | |
| tree | 1a0c7c3fc8641fccc99e2dff76f8642eaf657808 /core/java | |
| parent | 4ca3b32345171f4bc87c779bfc755f402a04ee88 (diff) | |
| parent | 8021a8fb0979e5f937123e7d05263e016ff435f2 (diff) | |
Merge "Revert "Fixes for a11y selection". Reverts hiding some selection UI" into tm-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/widget/TextView.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index f9c964158e2e..54c0d7c9af32 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -12617,7 +12617,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (start >= 0 && start <= end && end <= text.length()) { requestFocusOnNonEditableSelectableText(); Selection.setSelection((Spannable) text, start, end); - hideAccessibilitySelectionControllers(); + // Make sure selection mode is engaged. + if (mEditor != null) { + mEditor.startSelectionActionModeAsync(false); + } return true; } } @@ -13760,12 +13763,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener Selection.removeSelection((Spannable) text); } // Hide all selection controllers used for adjusting selection - // since we are doing so explicitly by other means and these + // since we are doing so explicitlty by other means and these // controllers interact with how selection behaves. - hideAccessibilitySelectionControllers(); - } - - private void hideAccessibilitySelectionControllers() { if (mEditor != null) { mEditor.hideCursorAndSpanControllers(); mEditor.stopTextActionMode(); |
