diff options
author | Christopher Baines <cbaines8@gmail.com> | 2012-02-28 15:29:26 +0000 |
---|---|---|
committer | Christopher Baines <cbaines8@gmail.com> | 2012-02-28 15:29:26 +0000 |
commit | ed7638698d439d75ada5120121a137f8e6f09bf8 (patch) | |
tree | 623e1211bb6b61200cb693ab0f9c61ec00716f68 /src/net/cbaines/suma/PreferencesActivity.java | |
parent | b5d0db004eaf72e9eeff0dfd7f612591d670b139 (diff) | |
download | southamptonuniversitymap-ed7638698d439d75ada5120121a137f8e6f09bf8.tar southamptonuniversitymap-ed7638698d439d75ada5120121a137f8e6f09bf8.tar.gz |
Improved URI stuff, and formating.
Diffstat (limited to 'src/net/cbaines/suma/PreferencesActivity.java')
-rw-r--r-- | src/net/cbaines/suma/PreferencesActivity.java | 40 |
1 files changed, 20 insertions, 20 deletions
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 |