Chromium Code Reviews| 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 3d81e1e3e632a5b4a844ba3ded21203046baccb1..6584e47c8030e25fff7c03c911a62c07365386e3 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 |
| @@ -4,6 +4,7 @@ |
| package org.chromium.content.browser.input; |
| +import android.content.res.Configuration; |
| import android.os.Handler; |
| import android.os.ResultReceiver; |
| import android.os.SystemClock; |
| @@ -64,6 +65,11 @@ public class ImeAdapter { |
| void onDismissInput(); |
| /** |
| + * Called when the keyboard could not be shown due to the hardware keyboard being present. |
| + */ |
| + void onKeyboardBoundsUnchanged(); |
| + |
| + /** |
| * @return View that the keyboard should be attached to. |
| */ |
| View getAttachedView(); |
| @@ -288,8 +294,13 @@ public class ImeAdapter { |
| private void showKeyboard() { |
| mIsShowWithoutHideOutstanding = true; |
| - mInputMethodManagerWrapper.showSoftInput(mViewEmbedder.getAttachedView(), 0, |
| - mViewEmbedder.getNewShowKeyboardReceiver()); |
| + if (mViewEmbedder.getAttachedView().getResources().getConfiguration().keyboard |
| + == Configuration.KEYBOARD_NOKEYS) { |
|
aurimas (slooooooooow)
2015/01/15 00:50:16
Does KEYBOARD_NOKEYS catch bluetooth keyboards?
please use gerrit instead
2015/01/15 01:09:13
I've tested with a wired USB keyboard only. (I hoo
|
| + mInputMethodManagerWrapper.showSoftInput(mViewEmbedder.getAttachedView(), 0, |
| + mViewEmbedder.getNewShowKeyboardReceiver()); |
| + } else { |
| + mViewEmbedder.onKeyboardBoundsUnchanged(); |
| + } |
| } |
| private void dismissInput(boolean unzoomIfNeeded) { |