| Index: content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
|
| index 3c8710a591b2db85dcf5336ca3b30f625940b09c..a1bf512541883a0f92238bd21d01574a8a03e924 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
|
| @@ -18,14 +18,12 @@ import android.view.View;
|
| import android.view.inputmethod.BaseInputConnection;
|
| import android.view.inputmethod.EditorInfo;
|
|
|
| -import org.chromium.base.CommandLine;
|
| import org.chromium.base.Log;
|
| import org.chromium.base.VisibleForTesting;
|
| import org.chromium.base.annotations.CalledByNative;
|
| import org.chromium.base.annotations.JNINamespace;
|
| import org.chromium.blink_public.web.WebInputEventModifier;
|
| import org.chromium.blink_public.web.WebInputEventType;
|
| -import org.chromium.content.common.ContentSwitches;
|
| import org.chromium.ui.base.ime.TextInputType;
|
| import org.chromium.ui.picker.InputDialogContainer;
|
|
|
| @@ -120,8 +118,13 @@ public class ImeAdapter {
|
| mViewEmbedder.getAttachedView().getResources().getConfiguration());
|
| }
|
|
|
| - void resetInputConnectionFactory() {
|
| - if (shouldUseImeThread()) {
|
| + private boolean isImeThreadEnabled() {
|
| + if (mNativeImeAdapterAndroid == 0) return false;
|
| + return nativeIsImeThreadEnabled(mNativeImeAdapterAndroid);
|
| + }
|
| +
|
| + private void resetInputConnectionFactory() {
|
| + if (isImeThreadEnabled()) {
|
| mInputConnectionFactory =
|
| new ThreadedInputConnectionFactory(mInputMethodManagerWrapper);
|
| } else {
|
| @@ -129,16 +132,6 @@ public class ImeAdapter {
|
| }
|
| }
|
|
|
| - private boolean shouldUseImeThread() {
|
| - if (CommandLine.getInstance().hasSwitch(ContentSwitches.DISABLE_IME_THREAD)) {
|
| - return false;
|
| - }
|
| - if (CommandLine.getInstance().hasSwitch(ContentSwitches.ENABLE_IME_THREAD)) {
|
| - return true;
|
| - }
|
| - return false;
|
| - }
|
| -
|
| /**
|
| * @see View#onCreateInputConnection(EditorInfo)
|
| */
|
| @@ -625,4 +618,5 @@ public class ImeAdapter {
|
| int before, int after);
|
| private native void nativeResetImeAdapter(long nativeImeAdapterAndroid);
|
| private native boolean nativeRequestTextInputStateUpdate(long nativeImeAdapterAndroid);
|
| + private native boolean nativeIsImeThreadEnabled(long nativeImeAdapterAndroid);
|
| }
|
|
|