aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-13 19:07:29 +0900
committerJean Chalard <jchalard@google.com>2013-12-13 20:47:25 +0900
commit28bd6e2297cad0182e9d7bf5ee155e653b3e589d (patch)
tree2a89aca8e64ad693141d57dc5db658c3f7171e45 /java
parenta245d15da5d295af21ead9a01583c64796a31ad7 (diff)
downloadlatinime-28bd6e2297cad0182e9d7bf5ee155e653b3e589d.tar.gz
latinime-28bd6e2297cad0182e9d7bf5ee155e653b3e589d.tar.xz
latinime-28bd6e2297cad0182e9d7bf5ee155e653b3e589d.zip
Only update shift state if left in auto mode.
Bug: 12100417 Change-Id: I7bc2b19332e142a257b0399f2e5d128caf01fc7c
Diffstat (limited to 'java')
-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 6a10131b0..8a814fe73 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1799,10 +1799,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 */));