diff options
author | 2014-09-18 22:56:55 +0000 | |
---|---|---|
committer | 2014-09-18 22:56:55 +0000 | |
commit | 885dedd0f600b5a2278b7c4f11644d2cc2d4b699 (patch) | |
tree | bbcec41f8fbabaa9a1b793ba3d309ffd3dfdc3f3 /java/src/com/android/inputmethod/latin/Suggest.java | |
parent | 8c9948f436bd764c6483d9af8c730e1b91e3b7ab (diff) | |
parent | 00e018370fdc3b66a7937a3f08197cedb7907c19 (diff) | |
download | latinime-885dedd0f600b5a2278b7c4f11644d2cc2d4b699.tar.gz latinime-885dedd0f600b5a2278b7c4f11644d2cc2d4b699.tar.xz latinime-885dedd0f600b5a2278b7c4f11644d2cc2d4b699.zip |
am 00e01837: Merge "(DO NOT MERGE) Fix showing important notice even at beginning of sentence" into lmp-dev
* commit '00e018370fdc3b66a7937a3f08197cedb7907c19':
(DO NOT MERGE) 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 6779351fd..b03818c1d 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -186,8 +186,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 @@ -240,6 +246,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 */, |