aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-08-14 16:16:29 +0900
committerJean Chalard <jchalard@google.com>2013-08-14 17:40:23 +0900
commitb7e782d8689c4071388cff073bbc9ae9309ba312 (patch)
tree0f58f21e91f36cbf4d6dcfc51c06e23f369d6ed6 /java/src
parentd81b9d0276a428fea3ae34dc2881eb649938b0e3 (diff)
downloadlatinime-b7e782d8689c4071388cff073bbc9ae9309ba312.tar.gz
latinime-b7e782d8689c4071388cff073bbc9ae9309ba312.tar.xz
latinime-b7e782d8689c4071388cff073bbc9ae9309ba312.zip
Re-evaluate auto-caps earlier.
We have all we know to re-evaluate auto-caps in this case. We don't need to wait until we get the callback from TextView. Bug: 10287972 Change-Id: I87e4e26cd193a001f91fe852ffc5a8f728db2449
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 4ddc1e15d..d8f2c1a4e 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1858,6 +1858,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
mConnection.setComposingText(getTextWithUnderline(mWordComposer.getTypedWord()), 1);
mHandler.postUpdateSuggestionStrip();
+ if (!mWordComposer.isComposingWord()) {
+ // If we just removed the last character, auto-caps mode may have changed so we
+ // need to re-evaluate.
+ mKeyboardSwitcher.updateShiftState();
+ }
} else {
final SettingsValues currentSettings = mSettings.getCurrent();
if (mLastComposedWord.canRevertCommit()) {
@@ -1940,6 +1945,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (currentSettings.isSuggestionsRequested(mDisplayOrientation)) {
restartSuggestionsOnWordBeforeCursorIfAtEndOfWord();
}
+ // We just removed a character. We need to update the auto-caps state.
+ mKeyboardSwitcher.updateShiftState();
}
}