aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-02-10 12:18:10 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-02-10 12:18:10 +0000
commitf9e5b1ee4ffa08fd10f8685cceff34daf2258ae0 (patch)
tree049cf5fba6453c872c2f9afe54598e1976e190c6 /java/src/com/android/inputmethod/latin/LatinIME.java
parent64faafbb0e0a048997cc52e7198e789baa14e85c (diff)
parent8dda9e480b6519ca57565c8aa507e14bff739b60 (diff)
downloadlatinime-f9e5b1ee4ffa08fd10f8685cceff34daf2258ae0.tar.gz
latinime-f9e5b1ee4ffa08fd10f8685cceff34daf2258ae0.tar.xz
latinime-f9e5b1ee4ffa08fd10f8685cceff34daf2258ae0.zip
Merge "Show important notice strip"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 3b427720a..432b8a5a9 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1350,8 +1350,17 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
public void setSuggestedWords(final SuggestedWords suggestedWords, final boolean shouldShow) {
mInputLogic.setSuggestedWords(suggestedWords);
if (mSuggestionStripView != null) {
- mSuggestionStripView.setSuggestions(suggestedWords,
- SubtypeLocaleUtils.isRtlLanguage(mSubtypeSwitcher.getCurrentSubtype()));
+ final boolean showSuggestions;
+ if (SuggestedWords.EMPTY == suggestedWords
+ || suggestedWords.mIsPunctuationSuggestions) {
+ showSuggestions = !mSuggestionStripView.maybeShowImportantNoticeTitle();
+ } else {
+ showSuggestions = true;
+ }
+ if (showSuggestions) {
+ mSuggestionStripView.setSuggestions(suggestedWords,
+ SubtypeLocaleUtils.isRtlLanguage(mSubtypeSwitcher.getCurrentSubtype()));
+ }
mKeyboardSwitcher.onAutoCorrectionStateChanged(suggestedWords.mWillAutoCorrect);
setSuggestionStripShownInternal(shouldShow, true /* needsInputViewShown */);
}