diff options
| author | Jean Chalard <jchalard@google.com> | 2014-09-05 16:47:23 +0900 |
|---|---|---|
| committer | Jean Chalard <jchalard@google.com> | 2014-09-05 07:56:25 +0000 |
| commit | 17901db6910317a4266b06035455b92f3a85a2e9 (patch) | |
| tree | 447db6d51dfbfbabb42b699da7f9e85eaefc5fe6 /java/src/com/android/inputmethod | |
| parent | 626e174519a813db42ddec3e2ebf92d2f72d5037 (diff) | |
Fix a bug where CAPS_WORDS would not be returned.
Also introduce some unit tests that would have caught the bug.
Bug: 17398284
Change-Id: Idb715b7bd2f70992d6cdf4e25ef368809382caef
Diffstat (limited to 'java/src/com/android/inputmethod')
| -rw-r--r-- | java/src/com/android/inputmethod/latin/utils/CapsModeUtils.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/utils/CapsModeUtils.java b/java/src/com/android/inputmethod/latin/utils/CapsModeUtils.java index 936219332..92bd02c54 100644 --- a/java/src/com/android/inputmethod/latin/utils/CapsModeUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/CapsModeUtils.java @@ -217,7 +217,8 @@ public final class CapsModeUtils { // a sentence. If it's neither, the only remaining case is the period so we get the opposite // case out of the way. if (c == Constants.CODE_QUESTION_MARK || c == Constants.CODE_EXCLAMATION_MARK) { - return (TextUtils.CAP_MODE_CHARACTERS | TextUtils.CAP_MODE_SENTENCES) & reqModes; + return (TextUtils.CAP_MODE_CHARACTERS | TextUtils.CAP_MODE_WORDS + | TextUtils.CAP_MODE_SENTENCES) & reqModes; } if (!spacingAndPunctuations.isSentenceSeparator(c) || j <= 0) { return (TextUtils.CAP_MODE_CHARACTERS | TextUtils.CAP_MODE_WORDS) & reqModes; |
