diff options
author | 2014-01-27 02:02:44 -0800 | |
---|---|---|
committer | 2014-01-27 02:02:44 -0800 | |
commit | 7f1a5c4d9b8bb97ca45d8a44d77fe1386738c7df (patch) | |
tree | 684121c4310201e2eaa5cbd8615fbf9697dfccb3 /java/src/com/android/inputmethod/latin/RichInputConnection.java | |
parent | a8b37414f835c07441162b1b873228333a097bbd (diff) | |
parent | 6d1c8b2c3f78969866db7f718e7e8d2be240f674 (diff) | |
download | latinime-7f1a5c4d9b8bb97ca45d8a44d77fe1386738c7df.tar.gz latinime-7f1a5c4d9b8bb97ca45d8a44d77fe1386738c7df.tar.xz latinime-7f1a5c4d9b8bb97ca45d8a44d77fe1386738c7df.zip |
am 6d1c8b2c: Merge "Try to figure out whether d.quotes open or close."
* commit '6d1c8b2c3f78969866db7f718e7e8d2be240f674':
Try to figure out whether d.quotes open or close.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputConnection.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/RichInputConnection.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java index 325a0d981..0d0b7a160 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -815,6 +815,17 @@ public final class RichInputConnection { } /** + * Looks at the text just before the cursor to find out if we are inside a double quote. + * + * As with #textBeforeCursorLooksLikeURL, this is dependent on how much text we have cached. + * However this won't be a concrete problem in most situations, as the cache is almost always + * long enough for this use. + */ + public boolean isInsideDoubleQuoteOrAfterDigit() { + return StringUtils.isInsideDoubleQuoteOrAfterDigit(mCommittedTextBeforeComposingText); + } + + /** * Try to get the text from the editor to expose lies the framework may have been * telling us. Concretely, when the device rotates, the frameworks tells us about where the * cursor used to be initially in the editor at the time it first received the focus; this |