am 373816ef: Stop showing both the floating toolbar and suggestions
* commit '373816ef1f7ab9954889ed02a6b2b39fe4aa4f44': Stop showing both the floating toolbar and suggestions
This commit is contained in:
@@ -1890,6 +1890,11 @@ public class Editor {
|
|||||||
|
|
||||||
if (!extractedTextModeWillBeStarted()) {
|
if (!extractedTextModeWillBeStarted()) {
|
||||||
if (isCursorInsideEasyCorrectionSpan()) {
|
if (isCursorInsideEasyCorrectionSpan()) {
|
||||||
|
// Cancel the single tap delayed runnable.
|
||||||
|
if (mSelectionModeWithoutSelectionRunnable != null) {
|
||||||
|
mTextView.removeCallbacks(mSelectionModeWithoutSelectionRunnable);
|
||||||
|
}
|
||||||
|
|
||||||
mShowSuggestionRunnable = new Runnable() {
|
mShowSuggestionRunnable = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
showSuggestions();
|
showSuggestions();
|
||||||
@@ -3819,13 +3824,15 @@ public class Editor {
|
|||||||
SystemClock.uptimeMillis() - TextView.sLastCutCopyOrTextChangedTime;
|
SystemClock.uptimeMillis() - TextView.sLastCutCopyOrTextChangedTime;
|
||||||
|
|
||||||
// Cancel the single tap delayed runnable.
|
// Cancel the single tap delayed runnable.
|
||||||
if (mDoubleTap && mSelectionModeWithoutSelectionRunnable != null) {
|
if (mSelectionModeWithoutSelectionRunnable != null
|
||||||
|
&& (mDoubleTap || isCursorInsideEasyCorrectionSpan())) {
|
||||||
mTextView.removeCallbacks(mSelectionModeWithoutSelectionRunnable);
|
mTextView.removeCallbacks(mSelectionModeWithoutSelectionRunnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare and schedule the single tap runnable to run exactly after the double tap
|
// Prepare and schedule the single tap runnable to run exactly after the double tap
|
||||||
// timeout has passed.
|
// timeout has passed.
|
||||||
if (!mDoubleTap && (durationSinceCutOrCopy < RECENT_CUT_COPY_DURATION)) {
|
if (!mDoubleTap && !isCursorInsideEasyCorrectionSpan()
|
||||||
|
&& (durationSinceCutOrCopy < RECENT_CUT_COPY_DURATION)) {
|
||||||
if (mSelectionModeWithoutSelectionRunnable == null) {
|
if (mSelectionModeWithoutSelectionRunnable == null) {
|
||||||
mSelectionModeWithoutSelectionRunnable = new Runnable() {
|
mSelectionModeWithoutSelectionRunnable = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|||||||
@@ -8015,8 +8015,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
* through a thunk.
|
* through a thunk.
|
||||||
*/
|
*/
|
||||||
void sendAfterTextChanged(Editable text) {
|
void sendAfterTextChanged(Editable text) {
|
||||||
sLastCutCopyOrTextChangedTime = 0;
|
|
||||||
|
|
||||||
if (mListeners != null) {
|
if (mListeners != null) {
|
||||||
final ArrayList<TextWatcher> list = mListeners;
|
final ArrayList<TextWatcher> list = mListeners;
|
||||||
final int count = list.size();
|
final int count = list.size();
|
||||||
@@ -8049,6 +8047,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
* through a thunk.
|
* through a thunk.
|
||||||
*/
|
*/
|
||||||
void handleTextChanged(CharSequence buffer, int start, int before, int after) {
|
void handleTextChanged(CharSequence buffer, int start, int before, int after) {
|
||||||
|
sLastCutCopyOrTextChangedTime = 0;
|
||||||
|
|
||||||
final Editor.InputMethodState ims = mEditor == null ? null : mEditor.mInputMethodState;
|
final Editor.InputMethodState ims = mEditor == null ? null : mEditor.mInputMethodState;
|
||||||
if (ims == null || ims.mBatchEditNesting == 0) {
|
if (ims == null || ims.mBatchEditNesting == 0) {
|
||||||
updateAfterEdit();
|
updateAfterEdit();
|
||||||
|
|||||||
Reference in New Issue
Block a user