aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-02 20:01:34 +0900
committerJean Chalard <jchalard@google.com>2012-03-02 20:01:34 +0900
commit38e535e59676ac4d7bf27026fe3e16fcd9eb292e (patch)
tree9d9a9fde2bed2727d8632c3debe1ed36be893768 /java/src
parent5bc2b61274d20adf4e1b0d5728fef43c6cd51429 (diff)
downloadlatinime-38e535e59676ac4d7bf27026fe3e16fcd9eb292e.tar.gz
latinime-38e535e59676ac4d7bf27026fe3e16fcd9eb292e.tar.xz
latinime-38e535e59676ac4d7bf27026fe3e16fcd9eb292e.zip
Change a parameter type to make a call clearer
Change-Id: I2918d0a8b00da743689b919f80128bbf36973f24
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 2217dd2b3..40db03c17 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -981,7 +981,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// When in fullscreen mode, show completions generated by the application
final SuggestedWords words = builder.build();
setSuggestions(words);
- setAutoCorrectionIndicator(words);
+ setAutoCorrectionIndicator(Utils.willAutoCorrect(words));
// TODO: is this the right thing to do? What should we auto-correct to in
// this case? This says to keep whatever the user typed.
mWordComposer.setAutoCorrection(mWordComposer.getTypedWord());
@@ -1715,7 +1715,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
public void clearSuggestions() {
setSuggestions(SuggestedWords.EMPTY);
- setAutoCorrectionIndicator(SuggestedWords.EMPTY);
+ setAutoCorrectionIndicator(Utils.willAutoCorrect(SuggestedWords.EMPTY));
}
public void setSuggestions(final SuggestedWords words) {
@@ -1726,13 +1726,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
}
- private void setAutoCorrectionIndicator(final SuggestedWords words) {
+ private void setAutoCorrectionIndicator(final boolean newAutoCorrectionIndicator) {
// Put a blue underline to a word in TextView which will be auto-corrected.
final InputConnection ic = getCurrentInputConnection();
if (ic != null) {
final boolean oldAutoCorrectionIndicator =
mComposingStateManager.isAutoCorrectionIndicatorOn();
- final boolean newAutoCorrectionIndicator = Utils.willAutoCorrect(words);
if (oldAutoCorrectionIndicator != newAutoCorrectionIndicator) {
mComposingStateManager.setAutoCorrectionIndicatorOn(newAutoCorrectionIndicator);
if (DEBUG) {
@@ -1853,7 +1852,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
mWordComposer.setAutoCorrection(autoCorrection);
setSuggestions(suggestedWords);
- setAutoCorrectionIndicator(suggestedWords);
+ setAutoCorrectionIndicator(Utils.willAutoCorrect(suggestedWords));
setSuggestionStripShown(isSuggestionsStripVisible());
}
@@ -2027,7 +2026,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
public void setPunctuationSuggestions() {
setSuggestions(mSettingsValues.mSuggestPuncList);
- setAutoCorrectionIndicator(mSettingsValues.mSuggestPuncList);
+ setAutoCorrectionIndicator(Utils.willAutoCorrect(mSettingsValues.mSuggestPuncList));
setSuggestionStripShown(isSuggestionsStripVisible());
}