aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-12-16 01:16:58 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-12-16 01:16:58 -0800
commit7400a87f00fccfb37313115b776a369a7e0a8178 (patch)
treebd5d05f8a0adff12ec33d62b2cd2f76b658f5c49 /java/src
parenta48c1d7b70a343221272e69f5549d5d17b2f2148 (diff)
parent4fc0f6ab029f7611c200692567ab1ed7aec1d017 (diff)
downloadlatinime-7400a87f00fccfb37313115b776a369a7e0a8178.tar.gz
latinime-7400a87f00fccfb37313115b776a369a7e0a8178.tar.xz
latinime-7400a87f00fccfb37313115b776a369a7e0a8178.zip
am 4fc0f6ab: Merge "Make insertSpaceOnPickSuggestionManually final."
* commit '4fc0f6ab029f7611c200692567ab1ed7aec1d017': Make insertSpaceOnPickSuggestionManually final.
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java34
1 files changed, 18 insertions, 16 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 3ea3c3697..abe6dfb96 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -798,28 +798,30 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
private void initializeInputAttributes(final EditorInfo editorInfo) {
mInputAttributes = new InputAttributes(editorInfo);
- boolean insertSpaceOnPickSuggestionManually = false;
+ final boolean insertSpaceOnPickSuggestionManually;
boolean inputTypeNoAutoCorrect = false;
boolean isSettingsSuggestionStripOn = false;
boolean applicationSpecifiedCompletionOn = false;
- if (editorInfo == null)
- return;
- final int inputType = editorInfo.inputType;
- if (inputType == InputType.TYPE_NULL) {
- // TODO: We should honor TYPE_NULL specification.
- Log.i(TAG, "InputType.TYPE_NULL is specified");
- }
- final int inputClass = inputType & InputType.TYPE_MASK_CLASS;
- final int variation = inputType & InputType.TYPE_MASK_VARIATION;
- if (inputClass == 0) {
- Log.w(TAG, String.format("Unexpected input class: inputType=0x%08x imeOptions=0x%08x",
- inputType, editorInfo.imeOptions));
- }
+ if (editorInfo == null || editorInfo.inputType != InputType.TYPE_CLASS_TEXT) {
+ if (editorInfo.inputType == InputType.TYPE_NULL) {
+ // TODO: We should honor TYPE_NULL specification.
+ Log.i(TAG, "InputType.TYPE_NULL is specified");
+ }
+ mApplicationSpecifiedCompletions = null;
+ insertSpaceOnPickSuggestionManually = false;
+ } else {
+ final int inputType = editorInfo.inputType;
+ final int inputClass = inputType & InputType.TYPE_MASK_CLASS;
+ final int variation = inputType & InputType.TYPE_MASK_VARIATION;
+ if (inputClass == 0) {
+ Log.w(TAG, String.format("Unexpected input class: inputType=0x%08x"
+ + " imeOptions=0x%08x",
+ inputType, editorInfo.imeOptions));
+ }
- mApplicationSpecifiedCompletions = null;
+ mApplicationSpecifiedCompletions = null;
- if (inputClass == InputType.TYPE_CLASS_TEXT) {
isSettingsSuggestionStripOn = true;
// Make sure that passwords are not displayed in {@link SuggestionsView}.
if (InputTypeCompatUtils.isPasswordInputType(inputType)