diff options
author | 2014-01-17 10:40:05 +0900 | |
---|---|---|
committer | 2014-01-27 18:17:33 +0900 | |
commit | c7ef305bbc119b820fd619d3ed205198d4f98c3f (patch) | |
tree | e219c2485b2da81ac5a9a6f2373dce60408bc765 /java/src/com/android/inputmethod/latin/RichInputConnection.java | |
parent | 963d97af6d83f62c48a4395caca8ac64972f8a57 (diff) | |
download | latinime-c7ef305bbc119b820fd619d3ed205198d4f98c3f.tar.gz latinime-c7ef305bbc119b820fd619d3ed205198d4f98c3f.tar.xz latinime-c7ef305bbc119b820fd619d3ed205198d4f98c3f.zip |
Try to figure out whether d.quotes open or close.
Bug: 8911672
Change-Id: I5d5635949530a67f95e5208986907251b7bce903
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 |