Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4623c88c authored by cretin45's avatar cretin45
Browse files

DeskClock: Remove "Week Start" preference

Issue-id: CYNGNOS-2208

Change-Id: I5b2eb70b784d39f218f8f32ef4d03426c84885ec
parent fb52be3b
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -57,13 +57,6 @@
            android:key="volume_setting"
            android:title="@string/alarm_volume_title" />

        <ListPreference
            android:key="week_start"
            android:title="@string/week_start_title"
            android:dialogTitle="@string/week_start_title"
            android:entries="@array/week_start_entries"
            android:entryValues="@array/week_start_values" />

        <ListPreference
            android:key="volume_button_setting"
            android:title="@string/volume_button_setting_title"
+0 −20
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ public class SettingsActivity extends BaseActivity {
    public static final String KEY_HOME_TZ = "home_time_zone";
    public static final String KEY_AUTO_HOME_CLOCK = "automatic_home_clock";
    public static final String KEY_VOLUME_BUTTONS = "volume_button_setting";
    public static final String KEY_WEEK_START = "week_start";
    public static final String KEY_SHOW_ALARM_ICON = "show_status_bar_icon";
    public static final String KEY_ALARM_SETTINGS = "key_alarm_settings";

@@ -162,10 +161,6 @@ public class SettingsActivity extends BaseActivity {
            } else if (KEY_SHAKE_ACTION.equals(pref.getKey())) {
                final ListPreference listPref = (ListPreference) pref;
                updateActionSummary(listPref, (String) newValue, R.string.shake_action_summary);
            } else if (KEY_WEEK_START.equals(pref.getKey())) {
                final ListPreference weekStartPref = (ListPreference) findPreference(KEY_WEEK_START);
                final int idx = weekStartPref.findIndexOfValue((String) newValue);
                weekStartPref.setSummary(weekStartPref.getEntries()[idx]);
            } else if (KEY_SHOW_ALARM_ICON.equals(pref.getKey())) {
                CMSettings.System.putInt(getActivity().getContentResolver(),
                        CMSettings.System.SHOW_ALARM_ICON, (Boolean) newValue ? 1 : 0);
@@ -289,21 +284,6 @@ public class SettingsActivity extends BaseActivity {
                    (SnoozeLengthDialog) findPreference(KEY_ALARM_SNOOZE);
            snoozePref.setSummary();

            final ListPreference weekStartPref = (ListPreference) findPreference(KEY_WEEK_START);
            // Set the default value programmatically
            final String value = weekStartPref.getValue();
            final int idx = weekStartPref.findIndexOfValue(
                    value == null ? String.valueOf(Utils.DEFAULT_WEEK_START) : value);
            weekStartPref.setValueIndex(idx);
            weekStartPref.setSummary(weekStartPref.getEntries()[idx]);
            weekStartPref.setOnPreferenceChangeListener(this);

            // Remove this. We're dynamically binding week start to the locale, but
            // piggybacking on the backing code for this setting
            PreferenceCategory alrmCategory = (PreferenceCategory)
                    getPreferenceScreen().findPreference(KEY_ALARM_SETTINGS);
            alrmCategory.removePreference(alrmCategory.findPreference(KEY_WEEK_START));

            final SwitchPreference showAlarmIconPref =
                    (SwitchPreference) findPreference(KEY_SHOW_ALARM_ICON);
            showAlarmIconPref.setOnPreferenceChangeListener(this);