From 2cbf152986a67ddffa909111718bb8d2dc80e5d7 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Mon, 3 Feb 2014 15:03:41 +0900 Subject: [PATCH] Have empty suggestions go through setNeutralSuggestions. Bug: 12865205 Change-Id: If17a390c445d0820325a9b16cc4f2f27a361187a --- java/src/com/android/inputmethod/latin/LatinIME.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 8f4b2d67e..32ced458f 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1401,10 +1401,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // because it may differ from mWordComposer.mTypedWord. autoCorrection = sourceSuggestedWords.mTypedWord; } - if (SuggestedWords.EMPTY != suggestedWords) { + if (SuggestedWords.EMPTY == suggestedWords) { + setNeutralSuggestionStrip(); + } else { mInputLogic.mWordComposer.setAutoCorrection(autoCorrection); + setSuggestedWords(suggestedWords, isSuggestionsStripVisible()); } - setSuggestedWords(suggestedWords, isSuggestionsStripVisible()); // Cache the auto-correction in accessibility code so we can speak it if the user // touches a key that will insert it. AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords,