From 688df79243762923f6cd34f767cb2f690b11a48c Mon Sep 17 00:00:00 2001 From: Gilles Debunne Date: Wed, 14 Sep 2011 15:52:03 -0700 Subject: 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 --- core/java/android/widget/AutoCompleteTextView.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'core/java/android/widget/AutoCompleteTextView.java') diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index 27610b9fe5c2..65f3f1c87f6d 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -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; + /** *

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()); } } -- cgit v1.2.3