diff options
author | 2012-09-19 15:18:13 -0700 | |
---|---|---|
committer | 2012-09-19 15:18:13 -0700 | |
commit | 455a7eb1e2e3fef74daab4af663606f8c28723e5 (patch) | |
tree | 8977deb5365edf4b036ea4a9b50af1c125b41cb3 /java/src/com/android/inputmethod/latin/RichInputConnection.java | |
parent | 3ee595047d970278749449c9139cf5c1c5ea4377 (diff) | |
parent | 15bb5950382feb91e263c9abaf15e874529ac3ca (diff) | |
download | latinime-455a7eb1e2e3fef74daab4af663606f8c28723e5.tar.gz latinime-455a7eb1e2e3fef74daab4af663606f8c28723e5.tar.xz latinime-455a7eb1e2e3fef74daab4af663606f8c28723e5.zip |
am 15bb5950: am c9923430: Merge "Support the gesture + phantom space case (A13)" into jb-mr1-dev
* commit '15bb5950382feb91e263c9abaf15e874529ac3ca':
Support the gesture + phantom space case (A13)
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, 10 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java index cbc6a93fa..28c0c0f16 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -209,7 +209,16 @@ public class RichInputConnection { final boolean hasSpaceBefore) { mIC = mParent.getCurrentInputConnection(); if (null == mIC) return Constants.TextUtils.CAP_MODE_OFF; - if (!TextUtils.isEmpty(mComposingText)) return Constants.TextUtils.CAP_MODE_OFF; + if (!TextUtils.isEmpty(mComposingText)) { + if (hasSpaceBefore) { + // If we have some composing text and a space before, then we should have + // MODE_CHARACTERS and MODE_WORDS on. + return (TextUtils.CAP_MODE_CHARACTERS | TextUtils.CAP_MODE_WORDS) & inputType; + } else { + // We have some composing text - we should be in MODE_CHARACTERS only. + return TextUtils.CAP_MODE_CHARACTERS & inputType; + } + } // TODO: this will generally work, but there may be cases where the buffer contains SOME // information but not enough to determine the caps mode accurately. This may happen after // heavy pressing of delete, for example DEFAULT_TEXT_CACHE_SIZE - 5 times or so. |