Skip to content

Commit 17146c7

Browse files
author
Michael Kolb
committed
Prevent IME from popping up on startup
Bug: 5869028 Change-Id: Ie5c7004def16eeac4147d19fb00fc9631a17579e
1 parent 01cc1d1 commit 17146c7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

core/java/android/webkit/WebView.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ public boolean deleteSurroundingText(int leftLength, int rightLength) {
422422
private final Rect mViewRectViewport = new Rect();
423423
private final RectF mVisibleContentRect = new RectF();
424424
private boolean mGLViewportEmpty = false;
425-
WebViewInputConnection mInputConnection = new WebViewInputConnection();
425+
WebViewInputConnection mInputConnection = null;
426426

427427

428428
/**
@@ -4946,16 +4946,14 @@ WebViewCore.CursorData cursorDataNoPosition() {
49464946
}
49474947
}
49484948

4949-
@Override
4950-
public boolean onCheckIsTextEditor() {
4951-
return true;
4952-
}
4953-
49544949
@Override
49554950
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
49564951
outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_FULLSCREEN
49574952
| EditorInfo.TYPE_CLASS_TEXT
49584953
| EditorInfo.TYPE_TEXT_VARIATION_NORMAL;
4954+
if (mInputConnection == null) {
4955+
mInputConnection = new WebViewInputConnection();
4956+
}
49594957
return mInputConnection;
49604958
}
49614959

0 commit comments

Comments
 (0)