aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-13 11:52:13 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-12-13 11:52:13 +0000
commit0b51fac907831c2f48290342294b11ae9caaaecb (patch)
treeef1592bd67805ac9f762688030aa255584b11c2c /java/src/com/android
parentf3d281b775532a8d0dd05ba708a9b962182fbd1c (diff)
parent28bd6e2297cad0182e9d7bf5ee155e653b3e589d (diff)
downloadlatinime-0b51fac907831c2f48290342294b11ae9caaaecb.tar.gz
latinime-0b51fac907831c2f48290342294b11ae9caaaecb.tar.xz
latinime-0b51fac907831c2f48290342294b11ae9caaaecb.zip
Merge "Only update shift state if left in auto mode."
Diffstat (limited to 'java/src/com/android')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 0f7263d77..96b1f942d 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1793,10 +1793,19 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final int codePointBeforeCursor = mConnection.getCodePointBeforeCursor();
if (Character.isLetterOrDigit(codePointBeforeCursor)
|| currentSettingsValues.isUsuallyFollowedBySpace(codePointBeforeCursor)) {
+ final boolean autoShiftHasBeenOverriden = mKeyboardSwitcher.getKeyboardShiftMode() !=
+ getCurrentAutoCapsState();
mSpaceState = SPACE_STATE_PHANTOM;
+ if (!autoShiftHasBeenOverriden) {
+ // When we change the space state, we need to update the shift state of the
+ // keyboard unless it has been overridden manually. This is happening for example
+ // after typing some letters and a period, then gesturing; the keyboard is not in
+ // caps mode yet, but since a gesture is starting, it should go in caps mode,
+ // unless the user explictly said it should not.
+ mKeyboardSwitcher.updateShiftState();
+ }
}
mConnection.endBatchEdit();
- mKeyboardSwitcher.updateShiftState();
mWordComposer.setCapitalizedModeAndPreviousWordAtStartComposingTime(getActualCapsMode(),
// Prev word is 1st word before cursor
getNthPreviousWordForSuggestion(currentSettingsValues, 1 /* nthPreviousWord */));