Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d76052df authored by Sally Yuen's avatar Sally Yuen Committed by Automerger Merge Worker
Browse files

Merge "Revert "Fixes for a11y selection". Reverts hiding some selection UI"...

Merge "Revert "Fixes for a11y selection". Reverts hiding some selection UI" into tm-dev am: b9d928ea

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17510341



Change-Id: I80f33e98c88d82fc8ab732568d3f70261818caf7
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0f46340d b9d928ea
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -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();