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:
Andrei Stingaceanu
2015-05-28 10:57:56 +00:00
committed by Android Git Automerger
2 changed files with 11 additions and 4 deletions

View File

@@ -1890,6 +1890,11 @@ public class Editor {
if (!extractedTextModeWillBeStarted()) {
if (isCursorInsideEasyCorrectionSpan()) {
// Cancel the single tap delayed runnable.
if (mSelectionModeWithoutSelectionRunnable != null) {
mTextView.removeCallbacks(mSelectionModeWithoutSelectionRunnable);
}
mShowSuggestionRunnable = new Runnable() {
public void run() {
showSuggestions();
@@ -3819,13 +3824,15 @@ public class Editor {
SystemClock.uptimeMillis() - TextView.sLastCutCopyOrTextChangedTime;
// Cancel the single tap delayed runnable.
if (mDoubleTap && mSelectionModeWithoutSelectionRunnable != null) {
if (mSelectionModeWithoutSelectionRunnable != null
&& (mDoubleTap || isCursorInsideEasyCorrectionSpan())) {
mTextView.removeCallbacks(mSelectionModeWithoutSelectionRunnable);
}
// Prepare and schedule the single tap runnable to run exactly after the double tap
// timeout has passed.
if (!mDoubleTap && (durationSinceCutOrCopy < RECENT_CUT_COPY_DURATION)) {
if (!mDoubleTap && !isCursorInsideEasyCorrectionSpan()
&& (durationSinceCutOrCopy < RECENT_CUT_COPY_DURATION)) {
if (mSelectionModeWithoutSelectionRunnable == null) {
mSelectionModeWithoutSelectionRunnable = new Runnable() {
public void run() {

View File

@@ -8015,8 +8015,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* through a thunk.
*/
void sendAfterTextChanged(Editable text) {
sLastCutCopyOrTextChangedTime = 0;
if (mListeners != null) {
final ArrayList<TextWatcher> list = mListeners;
final int count = list.size();
@@ -8049,6 +8047,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* through a thunk.
*/
void handleTextChanged(CharSequence buffer, int start, int before, int after) {
sLastCutCopyOrTextChangedTime = 0;
final Editor.InputMethodState ims = mEditor == null ? null : mEditor.mInputMethodState;
if (ims == null || ims.mBatchEditNesting == 0) {
updateAfterEdit();