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 6f49bb42dfd5e18b052474c079a764efb28acbb3..a77aaa3d56a34bda8443a3b76bbaaed00c0a0d21 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; |
@@ -67,6 +68,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(); |
@@ -274,8 +280,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) { |
+ mInputMethodManagerWrapper.showSoftInput(mViewEmbedder.getAttachedView(), 0, |
+ mViewEmbedder.getNewShowKeyboardReceiver()); |
+ } else { |
+ mViewEmbedder.onKeyboardBoundsUnchanged(); |
+ } |
} |
private void dismissInput(boolean unzoomIfNeeded) { |