diff options
author | 2014-09-18 10:11:11 +0000 | |
---|---|---|
committer | 2014-09-18 10:11:11 +0000 | |
commit | 3d54f42511fedb5bb9e68815a2ae8c8c0275def0 (patch) | |
tree | ed1544546eb8f01842a613cc86ce7b28339ed728 /java/src/com/android/inputmethod/latin/Suggest.java | |
parent | 40ba31a9cc865b665bd16a67cbdbd76fffba887b (diff) | |
parent | 0055d26164745b24b83d1cbda6d1b1a1acb36342 (diff) | |
download | latinime-3d54f42511fedb5bb9e68815a2ae8c8c0275def0.tar.gz latinime-3d54f42511fedb5bb9e68815a2ae8c8c0275def0.tar.xz latinime-3d54f42511fedb5bb9e68815a2ae8c8c0275def0.zip |
am 0055d261: Merge "Fix showing important notice even at beginning of sentence"
* commit '0055d26164745b24b83d1cbda6d1b1a1acb36342':
Fix showing important notice even at beginning of sentence
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 4ad5ba65e..1ecc995b2 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -188,8 +188,14 @@ public final class Suggest { suggestionsList = suggestionsContainer; } - final int inputStyle = resultsArePredictions ? SuggestedWords.INPUT_STYLE_PREDICTION : - inputStyleIfNotPrediction; + final int inputStyle; + if (resultsArePredictions) { + inputStyle = suggestionResults.mIsBeginningOfSentence + ? SuggestedWords.INPUT_STYLE_BEGINNING_OF_SENTENCE_PREDICTION + : SuggestedWords.INPUT_STYLE_PREDICTION; + } else { + inputStyle = inputStyleIfNotPrediction; + } callback.onGetSuggestedWords(new SuggestedWords(suggestionsList, suggestionResults.mRawSuggestions, // TODO: this first argument is lying. If this is a whitelisted word which is an @@ -244,6 +250,8 @@ public final class Suggest { // In the batch input mode, the most relevant suggested word should act as a "typed word" // (typedWordValid=true), not as an "auto correct word" (willAutoCorrect=false). + // Note that because this method is never used to get predictions, there is no need to + // modify inputType such in getSuggestedWordsForNonBatchInput. callback.onGetSuggestedWords(new SuggestedWords(suggestionsContainer, suggestionResults.mRawSuggestions, true /* typedWordValid */, |