summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2016-05-04 11:56:35 -0700
committerYohei Yukawa <yukawa@google.com>2016-05-04 11:56:35 -0700
commitd0d07974745dcc947bb498198166f5872c7ec4a1 (patch)
tree232f793aa555ef10f9df6e2a7ca68ef1411efe6c /core/java/android/inputmethodservice/InputMethodService.java
parentfacdf193139ab32582cf642a6648261bd873268a (diff)
Fix a behavior change in "Show software keyboard".
This bug was a corner case of stopping lying about Configuration#keyboard when "Show software keyboard" is turned on, which was done by my CL [1] in Android N development cycle. Previous implementation if (config.keyboard != Configuration.KEYBOARD_NOKEYS) { had relied on the fact that the system was lying about config.keyboard, which is no longer valid. We need to change the behavior of InputMethodService#onShowInputRequested() depending on Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD like we did for InputMethodService#onEvaluateInputViewShown() in [1] to minimize the impact on stopping lying about Configuration#keyboard. [1]: Id4d332e3909590c68345e10e1f2e18650efb2eb7 7b739a802cb7d97460a0bf8a1e9774efe96fa552 Bug: 28423439 Change-Id: I8a774cbf61ac706d8446be91b17bceee57a13656
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 085b97cc0f6d..923be5e06582 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -1536,8 +1536,8 @@ public class InputMethodService extends AbstractInputMethodService {
// mode at this point.
return false;
}
- Configuration config = getResources().getConfiguration();
- if (config.keyboard != Configuration.KEYBOARD_NOKEYS) {
+ if (!mSettingsObserver.shouldShowImeWithHardKeyboard() &&
+ getResources().getConfiguration().keyboard != Configuration.KEYBOARD_NOKEYS) {
// And if the device has a hard keyboard, even if it is
// currently hidden, don't show the input method implicitly.
// These kinds of devices don't need it that much.