| 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 9b34ac91c4e39ef9cb1bfd349358421fb3da7bdd..dabc504d036d20e620add6084b714ccbbde73158 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
|
| @@ -24,6 +24,7 @@ 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.base.annotations.SuppressFBWarnings;
|
| import org.chromium.blink_public.web.WebInputEventModifier;
|
| import org.chromium.blink_public.web.WebInputEventType;
|
| import org.chromium.blink_public.web.WebTextInputMode;
|
| @@ -59,6 +60,15 @@ public class ImeAdapter {
|
|
|
| public static final int COMPOSITION_KEY_CODE = 229;
|
|
|
| + private static ThreadLocal<Boolean> sTriggerDelayedOnCreateInputConnection =
|
| + new ThreadLocal<Boolean>() {
|
| + @SuppressFBWarnings("CHROMIUM_SYNCHRONIZED_METHOD")
|
| + @Override
|
| + protected synchronized Boolean initialValue() {
|
| + return true;
|
| + }
|
| + };
|
| +
|
| /**
|
| * Interface for the delegate that needs to be notified of IME changes.
|
| */
|
| @@ -158,6 +168,10 @@ public class ImeAdapter {
|
| }
|
| }
|
|
|
| + public void setTriggerDelayedOnCreateInputConnection(final boolean trigger) {
|
| + sTriggerDelayedOnCreateInputConnection.set(trigger);
|
| + }
|
| +
|
| private void createInputConnectionFactory() {
|
| if (mInputConnectionFactory != null) return;
|
| mInputConnectionFactory = new ThreadedInputConnectionFactory(mInputMethodManagerWrapper);
|
| @@ -179,6 +193,9 @@ public class ImeAdapter {
|
| return null;
|
| }
|
| if (mInputConnectionFactory == null) return null;
|
| +
|
| + mInputConnectionFactory.setTriggerDelayedOnCreateInputConnection(
|
| + sTriggerDelayedOnCreateInputConnection.get());
|
| setInputConnection(mInputConnectionFactory.initializeAndGet(mViewEmbedder.getAttachedView(),
|
| this, mTextInputType, mTextInputFlags, mTextInputMode, mLastSelectionStart,
|
| mLastSelectionEnd, outAttrs));
|
|
|