mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-11 00:00:05 +08:00
making preference reading code more robust
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user