am e49e007b: Fix: Use old suggest after reloading.

* commit 'e49e007bb233ab9ac0bfa8a36fcb4a67e41496c8':
  Fix: Use old suggest after reloading.
main
Keisuke Kuroyanagi 2014-02-18 19:46:58 -08:00 committed by Android Git Automerger
commit b7dbfcfe58
1 changed files with 3 additions and 1 deletions

View File

@ -775,9 +775,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Note: the following does a round-trip IPC on the main thread: be careful // Note: the following does a round-trip IPC on the main thread: be careful
final Locale currentLocale = mSubtypeSwitcher.getCurrentSubtypeLocale(); final Locale currentLocale = mSubtypeSwitcher.getCurrentSubtypeLocale();
final Suggest suggest = mInputLogic.mSuggest; Suggest suggest = mInputLogic.mSuggest;
if (null != suggest && null != currentLocale && !currentLocale.equals(suggest.mLocale)) { if (null != suggest && null != currentLocale && !currentLocale.equals(suggest.mLocale)) {
initSuggest(); initSuggest();
suggest = mInputLogic.mSuggest;
} }
// Sometimes, while rotating, for some reason the framework tells the app we are not // Sometimes, while rotating, for some reason the framework tells the app we are not
@ -802,6 +803,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (isDifferentTextField || if (isDifferentTextField ||
!currentSettingsValues.hasSameOrientation(getResources().getConfiguration())) { !currentSettingsValues.hasSameOrientation(getResources().getConfiguration())) {
loadSettings(); loadSettings();
suggest = mInputLogic.mSuggest;
} }
if (isDifferentTextField) { if (isDifferentTextField) {
mainKeyboardView.closing(); mainKeyboardView.closing();