Merge "Compare scrubbed strings when uncommitting LogUnits"

main
Kurt Partridge 2013-06-03 03:03:57 +00:00 committed by Android (Google) Code Review
commit a2f3f17de6
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}
}