OSDN Git Service

Only include WEB_EDIT if there are more textfields.
authorLeon Scroggins <scroggo@google.com>
Wed, 31 Mar 2010 19:32:36 +0000 (15:32 -0400)
committerCary Clark <cary@android.com>
Mon, 5 Apr 2010 18:31:37 +0000 (14:31 -0400)
Fixes http://b/issue?id=2559070

Requires a change to external/webkit.

Change-Id: I411a04d260c781a91d16832704bb5c34e9751bc1

core/java/android/webkit/WebTextView.java
core/java/android/webkit/WebView.java

index 016f016..870f512 100644 (file)
@@ -818,8 +818,10 @@ import java.util.ArrayList;
         boolean single = true;
         boolean inPassword = false;
         int maxLength = -1;
-        int inputType = EditorInfo.TYPE_CLASS_TEXT
-                | EditorInfo.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT;
+        int inputType = EditorInfo.TYPE_CLASS_TEXT;
+        if (mWebView.nativeFocusCandidateHasNextTextfield()) {
+            inputType |= EditorInfo.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT;
+        }
         int imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI
                 | EditorInfo.IME_FLAG_NO_FULLSCREEN;
         switch (type) {
index 0eb5177..0b79ac4 100644 (file)
@@ -7168,6 +7168,7 @@ public class WebView extends AbsoluteLayout
     private native int      nativeFindAll(String findLower, String findUpper);
     private native void     nativeFindNext(boolean forward);
     /* package */ native int      nativeFocusCandidateFramePointer();
+    /* package */ native boolean  nativeFocusCandidateHasNextTextfield();
     private native boolean  nativeFocusCandidateIsPassword();
     private native boolean  nativeFocusCandidateIsRtlText();
     private native boolean  nativeFocusCandidateIsTextInput();