diff options
| author | Leon Scroggins <scroggo@google.com> | 2009-12-02 14:50:41 -0500 |
|---|---|---|
| committer | Leon Scroggins <scroggo@google.com> | 2009-12-02 15:06:41 -0500 |
| commit | b5c7ef331cfca927c5b67bfe472eb7173a0ca69f (patch) | |
| tree | c29723ef0254a3480929c287072a62e81af1f866 /core/java/android/webkit/WebView.java | |
| parent | 4eeace3db541bd6fa0034a996630768cb521f2eb (diff) | |
| download | frameworks_base-b5c7ef331cfca927c5b67bfe472eb7173a0ca69f.zip frameworks_base-b5c7ef331cfca927c5b67bfe472eb7173a0ca69f.tar.gz frameworks_base-b5c7ef331cfca927c5b67bfe472eb7173a0ca69f.tar.bz2 | |
When passing the Message for saved form data, pass the node pointer properly.
Partial fix for http://b/issue?id=2232001
We were calling obtainMessage with the node pointer as an argument. What we
really need to do is set arg1 to the node pointer. Also, avoid checking for
saved form data for password fields and fields whose names are blank.
Diffstat (limited to 'core/java/android/webkit/WebView.java')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 6f15c12..7885b8a 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -3241,24 +3241,29 @@ public class WebView extends AbsoluteLayout mWebTextView.setNodePointer(nodePointer); int maxLength = -1; boolean isTextField = nativeFocusCandidateIsTextField(); + boolean isPassword; if (isTextField) { maxLength = nativeFocusCandidateMaxLength(); String name = nativeFocusCandidateName(); - if (mWebViewCore.getSettings().getSaveFormData() - && name != null) { + isPassword = nativeFocusCandidateIsPassword(); + if (!isPassword && mWebViewCore.getSettings().getSaveFormData() + && name != null && name.length() > 0) { Message update = mPrivateHandler.obtainMessage( - REQUEST_FORM_DATA, nodePointer); + REQUEST_FORM_DATA); + update.arg1 = nodePointer; RequestFormData updater = new RequestFormData(name, getUrl(), update); Thread t = new Thread(updater); t.start(); } + } else { + isPassword = false; } mWebTextView.setMaxLength(maxLength); AutoCompleteAdapter adapter = null; mWebTextView.setAdapterCustom(adapter); mWebTextView.setSingleLine(isTextField); - mWebTextView.setInPassword(nativeFocusCandidateIsPassword()); + mWebTextView.setInPassword(isPassword); if (null == text) { if (DebugFlags.WEB_VIEW) { Log.v(LOGTAG, "rebuildWebTextView null == text"); |
