Merge "Revert "Do not invoke textclassifier when dimissing the selection"" into sc-dev am: 2fdb6bd709
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14519405 Change-Id: I843ceedc119b6e7eb0efe7669d95c47bb2f439f0
This commit is contained in:
@@ -1725,23 +1725,15 @@ public class Editor {
|
||||
}
|
||||
|
||||
private void updateFloatingToolbarVisibility(MotionEvent event) {
|
||||
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())) {
|
||||
if (mTextActionMode != null) {
|
||||
switch (event.getActionMasked()) {
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
hideFloatingToolbar(ActionMode.DEFAULT_HIDE_DURATION);
|
||||
break;
|
||||
case MotionEvent.ACTION_UP: // fall through
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
showFloatingToolbar();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user