Merge "Prevent adapter flickering"

This commit is contained in:
John Reck
2011-10-06 10:22:03 -07:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 6 deletions

View File

@@ -896,7 +896,10 @@ import junit.framework.Assert;
* WebTextView represents.
*/
/* package */ void setNodePointer(int ptr) {
mNodePointer = ptr;
if (ptr != mNodePointer) {
mNodePointer = ptr;
setAdapterCustom(null);
}
}
/**
@@ -1051,11 +1054,12 @@ import junit.framework.Assert;
}
setHint(null);
setThreshold(1);
boolean autoComplete = false;
if (single) {
mWebView.requestLabel(mWebView.nativeFocusCandidateFramePointer(),
mNodePointer);
maxLength = mWebView.nativeFocusCandidateMaxLength();
boolean autoComplete = mWebView.nativeFocusCandidateIsAutoComplete();
autoComplete = mWebView.nativeFocusCandidateIsAutoComplete();
if (type != PASSWORD && (mAutoFillable || autoComplete)) {
String name = mWebView.nativeFocusCandidateName();
if (name != null && name.length() > 0) {
@@ -1070,8 +1074,9 @@ import junit.framework.Assert;
setInputType(inputType);
setImeOptions(imeOptions);
setVisibility(VISIBLE);
AutoCompleteAdapter adapter = null;
setAdapterCustom(adapter);
if (!autoComplete) {
setAdapterCustom(null);
}
}
/**

View File

@@ -3246,8 +3246,7 @@ public class WebView extends AbsoluteLayout
public void clearFormData() {
checkThread();
if (inEditingMode()) {
AutoCompleteAdapter adapter = null;
mWebTextView.setAdapterCustom(adapter);
mWebTextView.setAdapterCustom(null);
}
}