diff options
author | 2014-02-03 11:49:34 +0900 | |
---|---|---|
committer | 2014-02-10 21:15:35 +0900 | |
commit | 8dda9e480b6519ca57565c8aa507e14bff739b60 (patch) | |
tree | a4283b0102da8f3609381084bb320289bd483832 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 6422f77e9497120fe6b2d7ec012c214c06829bab (diff) | |
download | latinime-8dda9e480b6519ca57565c8aa507e14bff739b60.tar.gz latinime-8dda9e480b6519ca57565c8aa507e14bff739b60.tar.xz latinime-8dda9e480b6519ca57565c8aa507e14bff739b60.zip |
Show important notice strip
Bug: 10587358
Change-Id: I1af3faa59afb2fc4cb90176acff1c2b0b1ba369c
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 */); } |