summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2016-04-06 15:06:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-04-06 15:06:57 +0000
commit12a52bc3914ac593eb74f5787de54f3682d7f01d (patch)
tree23feffefaa99f62d916fc16a9409f4cf51a49df3 /core/java/android/inputmethodservice/InputMethodService.java
parent2084796e231104dac4c97903096b70b32534eee1 (diff)
parent2dbc53242927a796117a0b70d856021c0d4918a5 (diff)
Merge "Fix a regression in SHOW_IME_WITH_HARD_KEYBOARD handling." into nyc-dev
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 9d53a0001a84..cc201bc78bb5 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -717,7 +717,11 @@ public class InputMethodService extends AbstractInputMethodService {
mShowImeWithHardKeyboard = Settings.Secure.getInt(mService.getContentResolver(),
Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD, 0) != 0 ?
ShowImeWithHardKeyboardType.TRUE : ShowImeWithHardKeyboardType.FALSE;
- mService.updateInputViewShown();
+ // In Android M and prior, state change of
+ // Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD has triggered
+ // #onConfigurationChanged(). For compatibility reasons, we reset the internal
+ // state as if configuration was changed.
+ mService.resetStateForNewConfiguration();
}
}
@@ -884,7 +888,10 @@ public class InputMethodService extends AbstractInputMethodService {
*/
@Override public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
+ resetStateForNewConfiguration();
+ }
+ private void resetStateForNewConfiguration() {
boolean visible = mWindowVisible;
int showFlags = mShowInputFlags;
boolean showingInput = mShowInputRequested;