am 7cbd0478: Merge "Do not display punctuation suggestions when bigrams are on." into jb-dev

* commit '7cbd0478cfb66f406bb04c3b5c79da37b2263d66':
  Do not display punctuation suggestions when bigrams are on.
main
Jean Chalard 2012-06-14 14:49:21 -07:00 committed by Android Git Automerger
commit be82f2974b
2 changed files with 7 additions and 3 deletions

View File

@ -2053,12 +2053,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// showSuggestions will retrieve the word near the cursor, we don't want that here) // showSuggestions will retrieve the word near the cursor, we don't want that here)
showSuggestions(suggestedWords, ""); showSuggestions(suggestedWords, "");
} else { } else {
if (!isShowingPunctuationList()) setPunctuationSuggestions(); clearSuggestions();
} }
} }
public void setPunctuationSuggestions() { public void setPunctuationSuggestions() {
setSuggestions(mSettingsValues.mSuggestPuncList, false); if (mSettingsValues.mBigramPredictionEnabled) {
clearSuggestions();
} else {
setSuggestions(mSettingsValues.mSuggestPuncList, false);
}
setAutoCorrectionIndicator(false); setAutoCorrectionIndicator(false);
setSuggestionStripShown(isSuggestionsStripVisible()); setSuggestionStripShown(isSuggestionsStripVisible());
} }

View File

@ -670,7 +670,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
} }
public void setSuggestions(SuggestedWords suggestedWords) { public void setSuggestions(SuggestedWords suggestedWords) {
if (suggestedWords == null || suggestedWords.size() == 0) if (suggestedWords == null)
return; return;
clear(); clear();