From b84ee82e66d608151fcf552c82e7765a74e47fb0 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 7 Mar 2012 17:13:06 +0900 Subject: [PATCH] Recompute suggestions on language change. Bug: 6106407 Change-Id: I43d9c89610a9ed7a9f6825bd90334d7b343df52c --- java/src/com/android/inputmethod/latin/LatinIME.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index e755fa4a6..f810a656b 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -2266,6 +2266,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } initSuggest(); loadSettings(); + // Since we just changed languages, we should re-evaluate suggestions with whatever word + // we are currently composing. If we are not composing anything, we may want to display + // predictions or punctuation signs (which is done by updateBigramPredictions anyway). + if (isCursorTouchingWord()) { + mHandler.postUpdateSuggestions(); + } else { + mHandler.postUpdateBigramPredictions(); + } } public void hapticAndAudioFeedback(int primaryCode) {