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

Commit b3954bd6 authored by Fang Yunong's avatar Fang Yunong Committed by Gerrit - the friendly Code Review server
Browse files

Update the customize date format

Modify the feature to control the date format for customer

Change-Id: I05f9c73c0d1c151461fe17b9dde6771e46993849
CRs-Fixed: 1056112
parent a3da7f04
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.icu.text.DateFormat;
import android.icu.text.DisplayContext;
import android.util.AttributeSet;
import android.widget.TextView;
import android.provider.Settings;

import com.android.systemui.R;

@@ -117,7 +118,9 @@ public class DateView extends TextView {

    private String getDateFormat() {
        if (getContext().getResources().getBoolean(com.android.internal.R.bool.config_dateformat)) {
            return android.text.format.DateFormat.getDateFormat(getContext()).format(mCurrentTime);
            String dateformat = Settings.System.getString(getContext().getContentResolver(),
                    Settings.System.DATE_FORMAT);
            return android.text.format.DateFormat.format(dateformat, mCurrentTime).toString();
        } else {
            return mDateFormat.format(mCurrentTime);
        }