aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/PreferencesActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/cbaines/suma/PreferencesActivity.java')
-rw-r--r--src/net/cbaines/suma/PreferencesActivity.java43
1 files changed, 23 insertions, 20 deletions
diff --git a/src/net/cbaines/suma/PreferencesActivity.java b/src/net/cbaines/suma/PreferencesActivity.java
index d72d266..bab72bf 100644
--- a/src/net/cbaines/suma/PreferencesActivity.java
+++ b/src/net/cbaines/suma/PreferencesActivity.java
@@ -27,26 +27,29 @@ import android.preference.PreferenceManager;
public class PreferencesActivity extends PreferenceActivity implements Preferences {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
- final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
- final Editor editor = sharedPrefs.edit();
- if (!sharedPrefs.contains(GPS_ENABLED)) {
- editor.putBoolean(GPS_ENABLED, GPS_ENABLED_BY_DEFAULT);
- }
- if (!sharedPrefs.contains(UNI_LINK_BUS_TIMES)) {
- editor.putBoolean(UNI_LINK_BUS_TIMES, UNI_LINK_BUS_TIMES_ENABLED_BY_DEFAULT);
- }
- if (!sharedPrefs.contains(NON_UNI_LINK_BUS_TIMES)) {
- editor.putBoolean(NON_UNI_LINK_BUS_TIMES, NON_UNI_LINK_BUS_TIMES_ENABLED_BY_DEFAULT);
- }
- if (!sharedPrefs.contains(NON_UNI_LINK_BUS_STOPS_OVERLAY)) {
- editor.putBoolean(NON_UNI_LINK_BUS_STOPS_OVERLAY, NON_UNI_LINK_BUS_STOP_OVERLAY_ENABLED_BY_DEFAULT);
- }
- editor.commit();
+ final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
+ final Editor editor = sharedPrefs.edit();
+ if (!sharedPrefs.contains(GPS_ENABLED)) {
+ editor.putBoolean(GPS_ENABLED, GPS_ENABLED_BY_DEFAULT);
+ }
+ if (!sharedPrefs.contains(UNI_LINK_BUS_TIMES)) {
+ editor.putBoolean(UNI_LINK_BUS_TIMES, UNI_LINK_BUS_TIMES_ENABLED_BY_DEFAULT);
+ }
+ if (!sharedPrefs.contains(NON_UNI_LINK_BUS_TIMES)) {
+ editor.putBoolean(NON_UNI_LINK_BUS_TIMES, NON_UNI_LINK_BUS_TIMES_ENABLED_BY_DEFAULT);
+ }
+ if (!sharedPrefs.contains(NON_UNI_LINK_BUS_STOPS_OVERLAY)) {
+ editor.putBoolean(NON_UNI_LINK_BUS_STOPS_OVERLAY, NON_UNI_LINK_BUS_STOP_OVERLAY_ENABLED_BY_DEFAULT);
+ }
+ if (!sharedPrefs.contains(SHOW_IDENTIFIERS)) {
+ editor.putBoolean(SHOW_IDENTIFIERS, SHOW_IDENTIFIERS_ENABLED_BY_DEFAULT);
+ }
+ editor.commit();
- addPreferencesFromResource(R.xml.preferences);
- }
+ addPreferencesFromResource(R.xml.preferences);
+ }
} \ No newline at end of file