aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-11-04 12:36:38 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-11-04 15:01:58 +0900
commit1e39565bb48d23221145c494d4bf5665b514699d (patch)
treed2453a8b4688a5088dd2999331d5b1bf54dd8a9c /java/src
parentb8291fb46bbf852237416d94979d51b867c160f7 (diff)
downloadlatinime-1e39565bb48d23221145c494d4bf5665b514699d.tar.gz
latinime-1e39565bb48d23221145c494d4bf5665b514699d.tar.xz
latinime-1e39565bb48d23221145c494d4bf5665b514699d.zip
Skip loading keyboard when SoftInputWindow hasn't shown yet.
Bug: 5541192 Change-Id: I003101b2a3fdeb5bb554d249634ec5ab50aea09e
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index fd833157d..a6a3a5c88 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -2169,8 +2169,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// so that we need to re-create the keyboard input view here.
setInputView(mKeyboardSwitcher.onCreateInputView());
}
- // Reload keyboard because the current language has been changed.
- mKeyboardSwitcher.loadKeyboard(getCurrentInputEditorInfo(), mSettingsValues);
+ // When the device locale is changed in SetupWizard etc., this method may get called via
+ // onConfigurationChanged before SoftInputWindow is shown.
+ if (mKeyboardSwitcher.getKeyboardView() != null) {
+ // Reload keyboard because the current language has been changed.
+ mKeyboardSwitcher.loadKeyboard(getCurrentInputEditorInfo(), mSettingsValues);
+ }
initSuggest();
loadSettings();
}