aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-12-16 13:57:10 +0900
committerJean Chalard <jchalard@google.com>2011-12-16 19:08:13 +0900
commit13db05f93018f14b3695140bbed63a21b2d41bfe (patch)
treed36128c79fc54abd40ff90947386707fa13e0878 /java
parentd3bf7ac12fc4680dbed15ad51caf7165fc015241 (diff)
downloadlatinime-13db05f93018f14b3695140bbed63a21b2d41bfe.tar.gz
latinime-13db05f93018f14b3695140bbed63a21b2d41bfe.tar.xz
latinime-13db05f93018f14b3695140bbed63a21b2d41bfe.zip
Make isSettingsSuggestionStripOn final.
Change-Id: Iabb99a7f8f3f1777f9a87ae2bddff9795a50fa92
Diffstat (limited to 'java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 71db4550c..e5fb4adff 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -800,7 +800,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final boolean insertSpaceOnPickSuggestionManually;
boolean inputTypeNoAutoCorrect = false;
- boolean isSettingsSuggestionStripOn = false;
+ final boolean isSettingsSuggestionStripOn;
boolean applicationSpecifiedCompletionOn = false;
if (editorInfo == null || editorInfo.inputType != InputType.TYPE_CLASS_TEXT) {
@@ -810,6 +810,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
mApplicationSpecifiedCompletions = null;
insertSpaceOnPickSuggestionManually = false;
+ isSettingsSuggestionStripOn = false;
} else {
final int inputType = editorInfo.inputType;
final int inputClass = inputType & InputType.TYPE_MASK_CLASS;
@@ -830,12 +831,19 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
mApplicationSpecifiedCompletions = null;
- isSettingsSuggestionStripOn = true;
// Make sure that passwords are not displayed in {@link SuggestionsView}.
if (InputTypeCompatUtils.isPasswordInputType(inputType)
- || InputTypeCompatUtils.isVisiblePasswordInputType(inputType)) {
+ || InputTypeCompatUtils.isVisiblePasswordInputType(inputType)
+ || InputTypeCompatUtils.isEmailVariation(variation)
+ || InputType.TYPE_TEXT_VARIATION_URI == variation
+ || InputType.TYPE_TEXT_VARIATION_FILTER == variation
+ || flagNoSuggestions
+ || flagAutoComplete) {
isSettingsSuggestionStripOn = false;
+ } else {
+ isSettingsSuggestionStripOn = true;
}
+
if (InputTypeCompatUtils.isEmailVariation(variation)
|| variation == InputType.TYPE_TEXT_VARIATION_PERSON_NAME) {
// The point in turning this off is that we don't want to insert a space after
@@ -844,13 +852,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
} else {
insertSpaceOnPickSuggestionManually = true;
}
- if (InputTypeCompatUtils.isEmailVariation(variation)) {
- isSettingsSuggestionStripOn = false;
- } else if (variation == InputType.TYPE_TEXT_VARIATION_URI) {
- isSettingsSuggestionStripOn = false;
- } else if (variation == InputType.TYPE_TEXT_VARIATION_FILTER) {
- isSettingsSuggestionStripOn = false;
- } else if (variation == InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT) {
+ 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) {
@@ -860,7 +862,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// If NO_SUGGESTIONS is set, don't do prediction.
if (flagNoSuggestions) {
- isSettingsSuggestionStripOn = false;
inputTypeNoAutoCorrect = true;
}
// If it's not multiline and the autoCorrect flag is not set, then don't correct
@@ -868,7 +869,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
inputTypeNoAutoCorrect = true;
}
if (flagAutoComplete) {
- isSettingsSuggestionStripOn = false;
applicationSpecifiedCompletionOn = isFullscreenMode();
}
}