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

Commit 1eba97d9 authored by Jean Chalard's avatar Jean Chalard
Browse files

Treat all caps for gesture input.

Bug: 6950087
Change-Id: I9f2271780600572c9befa96c7ad98494c554dd2b
parent adbd9ae1
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -309,10 +309,8 @@ public class Suggest {
        final ArrayList<SuggestedWordInfo> suggestionsContainer =
                new ArrayList<SuggestedWordInfo>(suggestionsSet);
        final int suggestionsCount = suggestionsContainer.size();
        final boolean isFirstCharCapitalized = wordComposer.wasAutoCapitalized();
        // TODO: Handle the manual temporary shifted mode.
        // TODO: Should handle TextUtils.CAP_MODE_CHARACTER.
        final boolean isAllUpperCase = false;
        final boolean isFirstCharCapitalized = wordComposer.wasShiftedNoLock();
        final boolean isAllUpperCase = wordComposer.isAllUpperCase();
        if (isFirstCharCapitalized || isAllUpperCase) {
            for (int i = 0; i < suggestionsCount; ++i) {
                final SuggestedWordInfo wordInfo = suggestionsContainer.get(i);
+8 −1
Original line number Diff line number Diff line
@@ -270,7 +270,14 @@ public class WordComposer {
     * @return true if all user typed chars are upper case, false otherwise
     */
    public boolean isAllUpperCase() {
        return (mCapsCount > 0) && (mCapsCount == size());
        return mCapitalizedMode == CAPS_MODE_AUTO_SHIFT_LOCKED
                || mCapitalizedMode == CAPS_MODE_MANUAL_SHIFT_LOCKED
                || (mCapsCount > 0) && (mCapsCount == size());
    }

    public boolean wasShiftedNoLock() {
        return mCapitalizedMode == CAPS_MODE_AUTO_SHIFTED
                || mCapitalizedMode == CAPS_MODE_MANUAL_SHIFTED;
    }

    /**