Skip to content

Commit d9fdd9f

Browse files
Michael KolbAndroid (Google) Code Review
authored andcommitted
Merge "Prevent IME from popping up on startup"
2 parents ca917ac + 17146c7 commit d9fdd9f

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
/**
@@ -4941,16 +4941,14 @@ WebViewCore.CursorData cursorDataNoPosition() {
49414941
}
49424942
}
49434943

4944-
@Override
4945-
public boolean onCheckIsTextEditor() {
4946-
return true;
4947-
}
4948-
49494944
@Override
49504945
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
49514946
outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_FULLSCREEN
49524947
| EditorInfo.TYPE_CLASS_TEXT
49534948
| EditorInfo.TYPE_TEXT_VARIATION_NORMAL;
4949+
if (mInputConnection == null) {
4950+
mInputConnection = new WebViewInputConnection();
4951+
}
49544952
return mInputConnection;
49554953
}
49564954

0 commit comments

Comments
 (0)