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

Commit 688df792 authored by Gilles Debunne's avatar Gilles Debunne
Browse files

Bug 5299484: Recipient address in to field is doubled when entering in landscape mode

A tap on a completion in the keyboard calls onCommitCompletion, which in turn calls
performCompletion because of the DropDownItemClickListener.

As a result, the text is replaced twice. Removing the first text replacement.

Change-Id: I4974d23c68ab25ca0ad0cda5abf25f30129b28ee
parent b5dfcb8a
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package android.widget;

import com.android.internal.R;

import android.content.Context;
import android.content.res.TypedArray;
import android.database.DataSetObserver;
@@ -38,6 +36,8 @@ import android.view.inputmethod.CompletionInfo;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;

import com.android.internal.R;


/**
 * <p>An editable text view that shows completion suggestions automatically
@@ -837,10 +837,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
    @Override
    public void onCommitCompletion(CompletionInfo completion) {
        if (isPopupShowing()) {
            mBlockCompletion = true;
            replaceText(completion.getText());
            mBlockCompletion = false;

            mPopup.performItemClick(completion.getPosition());
        }
    }