diff options
author | 2013-12-13 08:34:12 -0800 | |
---|---|---|
committer | 2013-12-13 08:34:12 -0800 | |
commit | 3ac8ec6b03c59621b316975e38e2bd5352e59786 (patch) | |
tree | 470e2d847d6d111f9ed0df1fcbcadfba9cb0c58e /java/src/com | |
parent | c6137f176563c5e2f6518f6354576a96357f4d85 (diff) | |
parent | 0b51fac907831c2f48290342294b11ae9caaaecb (diff) | |
download | latinime-3ac8ec6b03c59621b316975e38e2bd5352e59786.tar.gz latinime-3ac8ec6b03c59621b316975e38e2bd5352e59786.tar.xz latinime-3ac8ec6b03c59621b316975e38e2bd5352e59786.zip |
am 0b51fac9: Merge "Only update shift state if left in auto mode."
* commit '0b51fac907831c2f48290342294b11ae9caaaecb':
Only update shift state if left in auto mode.
Diffstat (limited to 'java/src/com')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 11 |
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 */)); |