aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Suggest.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-09-19 09:23:37 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-19 09:23:37 +0000
commitce8a12f30cd0744532c0f68c38f4a3d2df2ecac2 (patch)
treeac3af83406a9493f3bf8773057a38ddcb068e1b5 /java/src/com/android/inputmethod/latin/Suggest.java
parentbc3a2a9777630d8600c4ef27de46836195d86e47 (diff)
parentfb92b7b427f0be52e1144b2daf8252d653059d6c (diff)
downloadlatinime-ce8a12f30cd0744532c0f68c38f4a3d2df2ecac2.tar.gz
latinime-ce8a12f30cd0744532c0f68c38f4a3d2df2ecac2.tar.xz
latinime-ce8a12f30cd0744532c0f68c38f4a3d2df2ecac2.zip
am fb92b7b4: am bf6977b9: am bd46e3f2: am 00e01837: Merge "(DO NOT MERGE) Fix showing important notice even at beginning of sentence" into lmp-dev
* commit 'fb92b7b427f0be52e1144b2daf8252d653059d6c': (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.java12
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 */,