diff options
author | 2012-09-13 19:55:18 -0700 | |
---|---|---|
committer | 2012-09-13 19:55:18 -0700 | |
commit | 352b0352a81565d6c0f3fa92c2033982330d54ac (patch) | |
tree | 6d565d82d6b2f4ee605bcb37a6b42b8111d767ba | |
parent | 6456aabb09a66cef407e777b66ac19548e2c635d (diff) | |
parent | 33a226f897f20d7cc623ad6facc17bf0382426a1 (diff) | |
download | latinime-352b0352a81565d6c0f3fa92c2033982330d54ac.tar.gz latinime-352b0352a81565d6c0f3fa92c2033982330d54ac.tar.xz latinime-352b0352a81565d6c0f3fa92c2033982330d54ac.zip |
am 33a226f8: Merge "Small simplification (A3)" into jb-mr1-dev
* commit '33a226f897f20d7cc623ad6facc17bf0382426a1':
Small simplification (A3)
-rw-r--r-- | java/src/com/android/inputmethod/latin/StringUtils.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/StringUtils.java b/java/src/com/android/inputmethod/latin/StringUtils.java index 4dec7881b..10aa105e4 100644 --- a/java/src/com/android/inputmethod/latin/StringUtils.java +++ b/java/src/com/android/inputmethod/latin/StringUtils.java @@ -220,7 +220,7 @@ public final class StringUtils { public static int getCapsMode(CharSequence cs, int reqModes) { int i; char c; - int mode = 0; + int mode = TextUtils.CAP_MODE_CHARACTERS; // Quick description of what we want to do: // CAP_MODE_CHARACTERS is always on. @@ -235,13 +235,10 @@ public final class StringUtils { // periods interleaved. // Step 1 : check for cap mode characters. If it's looked for, it's always on. - if ((reqModes & TextUtils.CAP_MODE_CHARACTERS) != 0) { - mode |= TextUtils.CAP_MODE_CHARACTERS; - } if ((reqModes & (TextUtils.CAP_MODE_WORDS | TextUtils.CAP_MODE_SENTENCES)) == 0) { // Here we are not looking for words or sentences modes, so since we already evaluated // mode characters, we can return. - return mode; + return mode & reqModes; } // Step 2 : Skip (ignore at the end of input) any opening punctuation. This includes |