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

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

Simplification (A112)

If we are not composing a word, that isFirstCharCapitalized
and isAllUpperCase are guaranteed to return false.

Change-Id: Ic4a0be9574acf4653c729a9594f963f5bcf0c757
parent d8afa2fb
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -170,9 +170,8 @@ public class Suggest {
            final WordComposer wordComposer, CharSequence prevWordForBigram,
            final WordComposer wordComposer, CharSequence prevWordForBigram,
            final ProximityInfo proximityInfo, final boolean isCorrectionEnabled) {
            final ProximityInfo proximityInfo, final boolean isCorrectionEnabled) {
        final boolean isPrediction = !wordComposer.isComposingWord();
        final boolean isPrediction = !wordComposer.isComposingWord();
        final boolean isFirstCharCapitalized =
        final boolean isFirstCharCapitalized = wordComposer.isFirstCharCapitalized();
                !isPrediction && wordComposer.isFirstCharCapitalized();
        final boolean isAllUpperCase = wordComposer.isAllUpperCase();
        final boolean isAllUpperCase = !isPrediction && wordComposer.isAllUpperCase();
        final int trailingSingleQuotesCount = wordComposer.trailingSingleQuotesCount();
        final int trailingSingleQuotesCount = wordComposer.trailingSingleQuotesCount();
        final BoundedTreeSet suggestionsSet = new BoundedTreeSet(sSuggestedWordInfoComparator,
        final BoundedTreeSet suggestionsSet = new BoundedTreeSet(sSuggestedWordInfoComparator,
                MAX_SUGGESTIONS);
                MAX_SUGGESTIONS);