diff options
author | 2014-06-27 06:52:24 +0000 | |
---|---|---|
committer | 2014-06-27 06:52:24 +0000 | |
commit | b9683c0b9c4d092d8f63ccdbd6d7ed138bdeb9d8 (patch) | |
tree | e011945f0b1c7c8f613c3a39cfd3425de5f58b58 /java/src/com/android/inputmethod/latin/RichInputConnection.java | |
parent | 1c07da6127e65bcac1e05383f925df4671c38051 (diff) | |
parent | bd5192ae260c3f462c36d7eefe76d9517b3528d5 (diff) | |
download | latinime-b9683c0b9c4d092d8f63ccdbd6d7ed138bdeb9d8.tar.gz latinime-b9683c0b9c4d092d8f63ccdbd6d7ed138bdeb9d8.tar.xz latinime-b9683c0b9c4d092d8f63ccdbd6d7ed138bdeb9d8.zip |
am bd5192ae: Merge "Add a relevant suggestion to period-checkable requests"
* commit 'bd5192ae260c3f462c36d7eefe76d9517b3528d5':
Add a relevant suggestion to period-checkable requests
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputConnection.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/RichInputConnection.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java index 3be6bccc6..c027892ba 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -741,13 +741,12 @@ public final class RichInputConnection { // 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); - final String periodSpace = ". "; - if (!TextUtils.equals(periodSpace, textBeforeCursor)) { + if (!TextUtils.equals(Constants.STRING_PERIOD_AND_SPACE, 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 " - + "\"" + periodSpace + "\" just before the cursor."); + + "\"" + Constants.STRING_PERIOD_AND_SPACE + "\" just before the cursor."); return false; } // Double-space results in ". ". A backspace to cancel this should result in a single |