diff options
author | 2014-02-10 12:18:10 +0000 | |
---|---|---|
committer | 2014-02-10 12:18:10 +0000 | |
commit | f9e5b1ee4ffa08fd10f8685cceff34daf2258ae0 (patch) | |
tree | 049cf5fba6453c872c2f9afe54598e1976e190c6 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 64faafbb0e0a048997cc52e7198e789baa14e85c (diff) | |
parent | 8dda9e480b6519ca57565c8aa507e14bff739b60 (diff) | |
download | latinime-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.java | 13 |
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 */); } |