aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-10-21 19:56:30 +0900
committerJean Chalard <jchalard@google.com>2011-10-21 19:59:46 +0900
commit26a531c6fe2a6e058803b7102e2bc9e7ea12d8f3 (patch)
tree1ee30d0e3f196b55fda255d1a31f22b8630aad3b /java/src
parent03d59130c11821aece39d0be3a4736b7bd8d8a1e (diff)
downloadlatinime-26a531c6fe2a6e058803b7102e2bc9e7ea12d8f3.tar.gz
latinime-26a531c6fe2a6e058803b7102e2bc9e7ea12d8f3.tar.xz
latinime-26a531c6fe2a6e058803b7102e2bc9e7ea12d8f3.zip
Rename a flag
...and insert some explaining commands Change-Id: Iff6511e71d66abfaea9f6c21c47f74fa0a67ad78
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 24d599eb6..cedf3c4b6 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -181,7 +181,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// TODO: Create an inner class to group options and pseudo-options to improve readability.
// These variables are initialized according to the {@link EditorInfo#inputType}.
- private boolean mShouldInsertMagicSpace;
+ private boolean mInsertSpaceOnPickSuggestionManually;
private boolean mInputTypeNoAutoCorrect;
private boolean mIsSettingsSuggestionStripOn;
private boolean mApplicationSpecifiedCompletionOn;
@@ -775,7 +775,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
inputType, attribute.imeOptions));
}
- mShouldInsertMagicSpace = false;
+ mInsertSpaceOnPickSuggestionManually = false;
mInputTypeNoAutoCorrect = false;
mIsSettingsSuggestionStripOn = false;
mApplicationSpecifiedCompletionOn = false;
@@ -790,9 +790,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
if (InputTypeCompatUtils.isEmailVariation(variation)
|| variation == InputType.TYPE_TEXT_VARIATION_PERSON_NAME) {
- mShouldInsertMagicSpace = false;
+ // The point in turning this off is that we don't want to insert a space after
+ // a name when filling a form: we can't delete trailing spaces when changing fields
+ mInsertSpaceOnPickSuggestionManually = false;
} else {
- mShouldInsertMagicSpace = true;
+ mInsertSpaceOnPickSuggestionManually = true;
}
if (InputTypeCompatUtils.isEmailVariation(variation)) {
mIsSettingsSuggestionStripOn = false;
@@ -1849,7 +1851,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
suggestion.toString(), index, suggestions.mWords);
TextEntryState.acceptedSuggestion(mComposingStringBuilder.toString(), suggestion);
// Follow it with a space
- if (mShouldInsertMagicSpace && !recorrecting) {
+ if (mInsertSpaceOnPickSuggestionManually && !recorrecting) {
sendMagicSpace();
}
@@ -2326,7 +2328,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
p.println(" mCorrectionMode=" + mCorrectionMode);
p.println(" mHasUncommittedTypedChars=" + mHasUncommittedTypedChars);
p.println(" mAutoCorrectEnabled=" + mSettingsValues.mAutoCorrectEnabled);
- p.println(" mShouldInsertMagicSpace=" + mShouldInsertMagicSpace);
+ p.println(" mInsertSpaceOnPickSuggestionManually=" + mInsertSpaceOnPickSuggestionManually);
p.println(" mApplicationSpecifiedCompletionOn=" + mApplicationSpecifiedCompletionOn);
p.println(" TextEntryState.state=" + TextEntryState.getState());
p.println(" mSoundOn=" + mSettingsValues.mSoundOn);