aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-01-11 19:54:43 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-01-11 19:54:43 -0800
commita0c2c65f1f1bf28c1813d32890ef1fd671978e30 (patch)
tree782395a3e68657741f27e96247c76538891e1267 /java/src
parent062168b625d45c44f468d67a8262dd20c2a26b36 (diff)
parent9de5cfc67a4e349c547e40678add27cdd6ca8490 (diff)
downloadlatinime-a0c2c65f1f1bf28c1813d32890ef1fd671978e30.tar.gz
latinime-a0c2c65f1f1bf28c1813d32890ef1fd671978e30.tar.xz
latinime-a0c2c65f1f1bf28c1813d32890ef1fd671978e30.zip
am 9de5cfc6: Fix a crash where revertSwap would be wrongly called
* commit '9de5cfc67a4e349c547e40678add27cdd6ca8490': Fix a crash where revertSwap would be wrongly called
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 4cb60558c..d07bd9bc0 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1202,7 +1202,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// swap it, and override the space state with SPACESTATE_SWAP_PUNCTUATION.
// To swap it, we fool handleSeparator to think the previous space state was a
// magic space.
- if (Keyboard.CODE_SPACE == toLeft && mSpaceState == SPACE_STATE_WEAK) {
+ if (Keyboard.CODE_SPACE == toLeft && mSpaceState == SPACE_STATE_WEAK
+ && mSettingsValues.isMagicSpaceSwapper(code))) {
mSpaceState = SPACE_STATE_MAGIC;
shouldRegisterSwapPunctuation = true;
} else {
@@ -2180,7 +2181,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// enter surrogate pairs this code will have been removed.
if (Keyboard.CODE_SPACE != textBeforeCursor.charAt(1)) {
// We should not have come here if the text before the cursor is not a space.
- throw new RuntimeException("Tried to revert a swap of punctiation but we didn't "
+ throw new RuntimeException("Tried to revert a swap of punctuation but we didn't "
+ "find a space just before the cursor.");
}
ic.beginBatchEdit();