From ed7638698d439d75ada5120121a137f8e6f09bf8 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 28 Feb 2012 15:29:26 +0000 Subject: Improved URI stuff, and formating. --- src/net/cbaines/suma/PreferencesActivity.java | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/net/cbaines/suma/PreferencesActivity.java') diff --git a/src/net/cbaines/suma/PreferencesActivity.java b/src/net/cbaines/suma/PreferencesActivity.java index d72d266..39e6bb2 100644 --- a/src/net/cbaines/suma/PreferencesActivity.java +++ b/src/net/cbaines/suma/PreferencesActivity.java @@ -27,26 +27,26 @@ 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); + } + editor.commit(); - addPreferencesFromResource(R.xml.preferences); - } + addPreferencesFromResource(R.xml.preferences); + } } \ No newline at end of file -- cgit v1.2.3