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

Commit 811d5c15 authored by Kenny Root's avatar Kenny Root Committed by Android (Google) Code Review
Browse files

Merge "Change dummy calendar setting during locale change"

parents 50edbbbc 151b0e11
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -88,7 +88,6 @@ public class DateTimeSettings extends SettingsPreferenceFragment
        boolean isFirstRun = intent.getBooleanExtra(EXTRA_IS_FIRST_RUN, false);
        boolean isFirstRun = intent.getBooleanExtra(EXTRA_IS_FIRST_RUN, false);


        mDummyDate = Calendar.getInstance();
        mDummyDate = Calendar.getInstance();
        mDummyDate.set(mDummyDate.get(Calendar.YEAR), 11, 31, 13, 0, 0);


        mAutoTimePref = (CheckBoxPreference) findPreference(KEY_AUTO_TIME);
        mAutoTimePref = (CheckBoxPreference) findPreference(KEY_AUTO_TIME);
        mAutoTimePref.setChecked(autoTimeEnabled);
        mAutoTimePref.setChecked(autoTimeEnabled);
@@ -171,6 +170,8 @@ public class DateTimeSettings extends SettingsPreferenceFragment
    public void updateTimeAndDateDisplay(Context context) {
    public void updateTimeAndDateDisplay(Context context) {
        java.text.DateFormat shortDateFormat = DateFormat.getDateFormat(context);
        java.text.DateFormat shortDateFormat = DateFormat.getDateFormat(context);
        final Calendar now = Calendar.getInstance();
        final Calendar now = Calendar.getInstance();
        mDummyDate.setTimeZone(now.getTimeZone());
        mDummyDate.set(now.get(Calendar.YEAR), 11, 31, 13, 0, 0);
        Date dummyDate = mDummyDate.getTime();
        Date dummyDate = mDummyDate.getTime();
        mTimePref.setSummary(DateFormat.getTimeFormat(getActivity()).format(now.getTime()));
        mTimePref.setSummary(DateFormat.getTimeFormat(getActivity()).format(now.getTime()));
        mTimeZone.setSummary(getTimeZoneText(now.getTimeZone()));
        mTimeZone.setSummary(getTimeZoneText(now.getTimeZone()));