summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-10-06 10:22:03 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-06 10:22:03 -0700
commit68b9074a60a8b20235c1887c09eb7073d48c9902 (patch)
treeafb1380dffd7189f5a1793bc54216815eaa3f9fd
parent526c2264d87ce123f93d1b5e744e4f03b4bd49a9 (diff)
parenta607060bbd985560a9fa0218906eddabf522d734 (diff)
downloadframeworks_base-68b9074a60a8b20235c1887c09eb7073d48c9902.zip
frameworks_base-68b9074a60a8b20235c1887c09eb7073d48c9902.tar.gz
frameworks_base-68b9074a60a8b20235c1887c09eb7073d48c9902.tar.bz2
Merge "Prevent adapter flickering"
-rw-r--r--core/java/android/webkit/WebTextView.java13
-rw-r--r--core/java/android/webkit/WebView.java3
2 files changed, 10 insertions, 6 deletions
diff --git a/core/java/android/webkit/WebTextView.java b/core/java/android/webkit/WebTextView.java
index 33f84a5..445b5e1 100644
--- a/core/java/android/webkit/WebTextView.java
+++ b/core/java/android/webkit/WebTextView.java
@@ -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);
+ }
}
/**
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 89f21d7..5111969 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -3246,8 +3246,7 @@ public class WebView extends AbsoluteLayout
public void clearFormData() {
checkThread();
if (inEditingMode()) {
- AutoCompleteAdapter adapter = null;
- mWebTextView.setAdapterCustom(adapter);
+ mWebTextView.setAdapterCustom(null);
}
}