making preference reading code more robust

This commit is contained in:
alunny
2012-01-02 22:40:08 -08:00
parent 3af4d6b139
commit ffa76246e3
3 changed files with 27 additions and 2 deletions
@@ -30,4 +30,14 @@ public class PreferenceSet {
return null;
}
public boolean prefMatches(String prefName, String prefValue) {
String value = pref(prefName);
if (value == null) {
return false;
} else {
return value.equals(prefValue);
}
}
}