diff options
author | 2014-02-10 04:27:26 -0800 | |
---|---|---|
committer | 2014-02-10 04:27:26 -0800 | |
commit | 909ad2c4ff38b24aad59fba2a95b530248704ce9 (patch) | |
tree | 6f38f8a3c0cf7ef557285aca0a1493ff7ab2d7a6 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | b4747d83004c57e425b933ed89826440b4a0bce1 (diff) | |
parent | f9e5b1ee4ffa08fd10f8685cceff34daf2258ae0 (diff) | |
download | latinime-909ad2c4ff38b24aad59fba2a95b530248704ce9.tar.gz latinime-909ad2c4ff38b24aad59fba2a95b530248704ce9.tar.xz latinime-909ad2c4ff38b24aad59fba2a95b530248704ce9.zip |
am f9e5b1ee: Merge "Show important notice strip"
* commit 'f9e5b1ee4ffa08fd10f8685cceff34daf2258ae0':
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 */); } |