Fix: Use old suggest after reloading.
Change-Id: Icb2821f61c4203254b7d573cad5ce71fbf0ed841
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 75ba24d7..459f6d8 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -775,9 +775,10 @@
// Note: the following does a round-trip IPC on the main thread: be careful
final Locale currentLocale = mSubtypeSwitcher.getCurrentSubtypeLocale();
- final Suggest suggest = mInputLogic.mSuggest;
+ Suggest suggest = mInputLogic.mSuggest;
if (null != suggest && null != currentLocale && !currentLocale.equals(suggest.mLocale)) {
initSuggest();
+ suggest = mInputLogic.mSuggest;
}
// Sometimes, while rotating, for some reason the framework tells the app we are not
@@ -802,6 +803,7 @@
if (isDifferentTextField ||
!currentSettingsValues.hasSameOrientation(getResources().getConfiguration())) {
loadSettings();
+ suggest = mInputLogic.mSuggest;
}
if (isDifferentTextField) {
mainKeyboardView.closing();