23 lines
587 B
Java
23 lines
587 B
Java
package org.r3pek.pharmacies;
|
|
|
|
import android.content.Context;
|
|
import android.content.SharedPreferences;
|
|
import android.preference.PreferenceManager;
|
|
|
|
public class ConfigValues {
|
|
private static SharedPreferences settings;
|
|
|
|
public ConfigValues(Context ctx) {
|
|
settings = PreferenceManager.getDefaultSharedPreferences(ctx);
|
|
}
|
|
|
|
public boolean isOnlyService() {
|
|
return settings.getBoolean("pref_gen_just_onservice", false);
|
|
}
|
|
|
|
public int getRadius() {
|
|
int dist = settings.getInt("pref_gen_maxdist", 2000);
|
|
return dist == 2000 ? dist : dist * 1000;
|
|
}
|
|
|
|
}
|