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

Commit 693da5ac authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Settings: Timezone use locale separators"

parents 7892634b 138b7338
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -80,4 +80,7 @@

    <!-- whether to show sound profile and hide sound settings -->
    <bool name="show_profile_and_hide_sound_settings">false</bool>

    <!-- show locale timezone separator, leave null to use default one-->
    <string name="timezone_separator_locale"></string>
</resources>
+8 −1
Original line number Diff line number Diff line
@@ -197,7 +197,14 @@ public class DateTimeSettings extends SettingsPreferenceFragment
        mDummyDate.set(now.get(Calendar.YEAR), 11, 31, 13, 0, 0);
        Date dummyDate = mDummyDate.getTime();
        mTimePref.setSummary(DateFormat.getTimeFormat(getActivity()).format(now.getTime()));
        mTimeZone.setSummary(getTimeZoneText(now.getTimeZone(), true));

        String timezoneText = getTimeZoneText(now.getTimeZone(), true);
        String timezoneSeparatorLocale = getResources().getString(
                R.string.timezone_separator_locale);
        if (!TextUtils.isEmpty(timezoneSeparatorLocale)) {
            timezoneText = timezoneText.replace(":", timezoneSeparatorLocale);
        }
        mTimeZone.setSummary(timezoneText);
        mDatePref.setSummary(shortDateFormat.format(now.getTime()));
        mDateFormat.setSummary(shortDateFormat.format(dummyDate));
        mTime24Pref.setSummary(DateFormat.getTimeFormat(getActivity()).format(dummyDate));