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

Commit 2b2f7880 authored by Tony Mak's avatar Tony Mak Committed by Android (Google) Code Review
Browse files

Merge "Do not invoke textclassifier when dimissing the selection" into sc-dev

parents e89f8f97 90e8a19f
Loading
Loading
Loading
Loading
+16 −8
Original line number Diff line number Diff line
@@ -1705,13 +1705,21 @@ public class Editor {
    }

    private void updateFloatingToolbarVisibility(MotionEvent event) {
        if (mTextActionMode != null) {
        if (mTextActionMode == null) {
            return;
        }
        switch (event.getActionMasked()) {
            case MotionEvent.ACTION_MOVE:
                hideFloatingToolbar(ActionMode.DEFAULT_HIDE_DURATION);
                break;
            case MotionEvent.ACTION_UP:  // fall through
            case MotionEvent.ACTION_CANCEL:
                final SelectionModifierCursorController selectionController =
                        getSelectionController();
                final InsertionPointCursorController insertionController = getInsertionController();
                if ((selectionController != null && selectionController.isCursorBeingModified())
                        || (insertionController != null
                        && insertionController.isCursorBeingModified())) {
                    showFloatingToolbar();
                }
        }