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

Commit a2f3f17d authored by Kurt Partridge's avatar Kurt Partridge Committed by Android (Google) Code Review
Browse files

Merge "Compare scrubbed strings when uncommitting LogUnits"

parents 74330288 f07024e0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -863,7 +863,10 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
        // Check that expected word matches.
        if (oldLogUnit != null) {
            final String oldLogUnitWords = oldLogUnit.getWordsAsString();
            if (oldLogUnitWords != null && !oldLogUnitWords.equals(expectedWord)) {
            // Because the word is stored in the LogUnit with digits scrubbed, the comparison must
            // be made on a scrubbed version of the expectedWord as well.
            if (oldLogUnitWords != null && !oldLogUnitWords.equals(
                    scrubDigitsFromString(expectedWord))) {
                return;
            }
        }