From 17146c7cc007c21b3ec36f8dec76aded15e7a53f Mon Sep 17 00:00:00 2001 From: Michael Kolb Date: Wed, 18 Jan 2012 11:20:01 -0800 Subject: Prevent IME from popping up on startup Bug: 5869028 Change-Id: Ie5c7004def16eeac4147d19fb00fc9631a17579e --- core/java/android/webkit/WebView.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'core') diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 770f8ac..ff05a87 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -422,7 +422,7 @@ public class WebView extends AbsoluteLayout private final Rect mViewRectViewport = new Rect(); private final RectF mVisibleContentRect = new RectF(); private boolean mGLViewportEmpty = false; - WebViewInputConnection mInputConnection = new WebViewInputConnection(); + WebViewInputConnection mInputConnection = null; /** @@ -4947,15 +4947,13 @@ public class WebView extends AbsoluteLayout } @Override - public boolean onCheckIsTextEditor() { - return true; - } - - @Override public InputConnection onCreateInputConnection(EditorInfo outAttrs) { outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_FULLSCREEN | EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_NORMAL; + if (mInputConnection == null) { + mInputConnection = new WebViewInputConnection(); + } return mInputConnection; } -- cgit v1.1