Merge "Fix a bug that would persist caps lock state" into jb-mr1-dev

main
Jean Chalard 2012-09-19 02:30:49 -07:00 committed by Android (Google) Code Review
commit caf15c3c67
1 changed files with 6 additions and 3 deletions

View File

@ -265,9 +265,12 @@ public class WordComposer {
* @return true if all user typed chars are upper case, false otherwise * @return true if all user typed chars are upper case, false otherwise
*/ */
public boolean isAllUpperCase() { public boolean isAllUpperCase() {
return mCapitalizedMode == CAPS_MODE_AUTO_SHIFT_LOCKED if (size() <= 1) {
|| mCapitalizedMode == CAPS_MODE_MANUAL_SHIFT_LOCKED return mCapitalizedMode == CAPS_MODE_AUTO_SHIFT_LOCKED
|| (mCapsCount > 1) && (mCapsCount == size()); || mCapitalizedMode == CAPS_MODE_MANUAL_SHIFT_LOCKED;
} else {
return mCapsCount == size();
}
} }
public boolean wasShiftedNoLock() { public boolean wasShiftedNoLock() {