diff options
author | 2014-09-08 13:15:12 +0000 | |
---|---|---|
committer | 2014-09-08 13:15:12 +0000 | |
commit | 93770226da71294ce828dabcff2ed516433ac0de (patch) | |
tree | fad41ba47d95be9be290ae9d7c48ceb72901a985 /java/src/com/android/inputmethod/latin/RichInputConnection.java | |
parent | 1ae250483a1c7c77e37d98dffc3c8e7a01a43219 (diff) | |
parent | b41ee671944aee97163c1567d7407fc3bd7507a3 (diff) | |
download | latinime-93770226da71294ce828dabcff2ed516433ac0de.tar.gz latinime-93770226da71294ce828dabcff2ed516433ac0de.tar.xz latinime-93770226da71294ce828dabcff2ed516433ac0de.zip |
am b41ee671: Fix the sentence separator for Hindi.
* commit 'b41ee671944aee97163c1567d7407fc3bd7507a3':
Fix the sentence separator for Hindi.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputConnection.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/RichInputConnection.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java index 6b6384c48..0e85d13b6 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -729,17 +729,19 @@ public final class RichInputConnection { return TextUtils.equals(text, beforeText); } - public boolean revertDoubleSpacePeriod() { + public boolean revertDoubleSpacePeriod(final SpacingAndPunctuations spacingAndPunctuations) { if (DEBUG_BATCH_NESTING) checkBatchEdit(); // Here we test whether we indeed have a period and a space before us. This should not // be needed, but it's there just in case something went wrong. final CharSequence textBeforeCursor = getTextBeforeCursor(2, 0); - if (!TextUtils.equals(Constants.STRING_PERIOD_AND_SPACE, textBeforeCursor)) { + if (!TextUtils.equals(spacingAndPunctuations.mSentenceSeparatorAndSpace, + textBeforeCursor)) { // Theoretically we should not be coming here if there isn't ". " before the // cursor, but the application may be changing the text while we are typing, so // anything goes. We should not crash. - Log.d(TAG, "Tried to revert double-space combo but we didn't find " - + "\"" + Constants.STRING_PERIOD_AND_SPACE + "\" just before the cursor."); + Log.d(TAG, "Tried to revert double-space combo but we didn't find \"" + + spacingAndPunctuations.mSentenceSeparatorAndSpace + + "\" just before the cursor."); return false; } // Double-space results in ". ". A backspace to cancel this should result in a single |