fix SP for long with string-ressource-id
This commit is contained in:
parent
d1aec1ff18
commit
4b063a7766
|
@ -65,7 +65,11 @@ public class SP {
|
|||
}
|
||||
|
||||
static public long getLong(int resourceID, Long defaultValue) {
|
||||
return SafeParse.stringToLong(sharedPreferences.getString(MainApp.sResources.getString(resourceID), defaultValue.toString()));
|
||||
try {
|
||||
return sharedPreferences.getLong(MainApp.sResources.getString(resourceID), defaultValue);
|
||||
} catch (Exception e) {
|
||||
return SafeParse.stringToLong(sharedPreferences.getString(MainApp.sResources.getString(resourceID), defaultValue.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
static public long getLong(String key, Long defaultValue) {
|
||||
|
|
Loading…
Reference in a new issue