aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-12-16 14:00:00 +0900
committerJean Chalard <jchalard@google.com>2011-12-16 19:08:52 +0900
commit9cc1312eeeeb526515f32a2b5751deadf73d3d9b (patch)
tree9ca35329e50e47a252dd0466d4a60e6208d704e0 /java/src
parent13db05f93018f14b3695140bbed63a21b2d41bfe (diff)
downloadlatinime-9cc1312eeeeb526515f32a2b5751deadf73d3d9b.tar.gz
latinime-9cc1312eeeeb526515f32a2b5751deadf73d3d9b.tar.xz
latinime-9cc1312eeeeb526515f32a2b5751deadf73d3d9b.zip
Make inputTypeAutoCorrect final.
Change-Id: I550eba1fc3fa2843d007a8208d81fad208c1196b
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java21
1 files changed, 9 insertions, 12 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index e5fb4adff..238ebc958 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -799,7 +799,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
mInputAttributes = new InputAttributes(editorInfo);
final boolean insertSpaceOnPickSuggestionManually;
- boolean inputTypeNoAutoCorrect = false;
+ final boolean inputTypeNoAutoCorrect;
final boolean isSettingsSuggestionStripOn;
boolean applicationSpecifiedCompletionOn = false;
@@ -811,6 +811,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
mApplicationSpecifiedCompletions = null;
insertSpaceOnPickSuggestionManually = false;
isSettingsSuggestionStripOn = false;
+ inputTypeNoAutoCorrect = false;
} else {
final int inputType = editorInfo.inputType;
final int inputClass = inputType & InputType.TYPE_MASK_CLASS;
@@ -852,21 +853,17 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
} else {
insertSpaceOnPickSuggestionManually = true;
}
- if (variation == InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT) {
- // If it's a browser edit field and auto correct is not ON explicitly, then
- // disable auto correction, but keep suggestions on.
- if (!flagAutoCorrect) {
- inputTypeNoAutoCorrect = true;
- }
- }
+ // If it's a browser edit field and auto correct is not ON explicitly, then
+ // disable auto correction, but keep suggestions on.
// If NO_SUGGESTIONS is set, don't do prediction.
- if (flagNoSuggestions) {
- inputTypeNoAutoCorrect = true;
- }
// If it's not multiline and the autoCorrect flag is not set, then don't correct
- if (!flagAutoCorrect && !flagMultiLine) {
+ if ((variation == InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT && !flagAutoCorrect)
+ || flagNoSuggestions
+ || (!flagAutoCorrect && !flagMultiLine)) {
inputTypeNoAutoCorrect = true;
+ } else {
+ inputTypeNoAutoCorrect = false;
}
if (flagAutoComplete) {
applicationSpecifiedCompletionOn = isFullscreenMode();