Fix a bug that would persist caps lock state
...with regards to suggestions. It's much simpler to look at whether the word is actually all capitalized or not. Bug: 7113544 Change-Id: Idc0e77b2f812964e650ade0e32b9d4c09228cb74
This commit is contained in:
parent
a0ebb28d15
commit
ad0642cf25
1 changed files with 6 additions and 3 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue