Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad0642cf authored by Jean Chalard's avatar Jean Chalard
Browse files

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
parent a0ebb28d
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -265,9 +265,12 @@ public class WordComposer {
     * @return true if all user typed chars are upper case, false otherwise
     */
    public boolean isAllUpperCase() {
        if (size() <= 1) {
            return mCapitalizedMode == CAPS_MODE_AUTO_SHIFT_LOCKED
                || mCapitalizedMode == CAPS_MODE_MANUAL_SHIFT_LOCKED
                || (mCapsCount > 1) && (mCapsCount == size());
                    || mCapitalizedMode == CAPS_MODE_MANUAL_SHIFT_LOCKED;
        } else {
            return mCapsCount == size();
        }
    }

    public boolean wasShiftedNoLock() {