am a2f3f17d: Merge "Compare scrubbed strings when uncommitting LogUnits"

* commit 'a2f3f17de6a70e25293861b02d7a5ecf79c47907':
  Compare scrubbed strings when uncommitting LogUnits
This commit is contained in:
Kurt Partridge 2013-06-02 20:06:46 -07:00 committed by Android Git Automerger
commit ef827a99d0

View file

@ -863,7 +863,10 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
// Check that expected word matches. // Check that expected word matches.
if (oldLogUnit != null) { if (oldLogUnit != null) {
final String oldLogUnitWords = oldLogUnit.getWordsAsString(); 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; return;
} }
} }