You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
587 B
23 lines
587 B
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;
|
|
}
|
|
|
|
}
|
|
|