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

Commit 5568e0e4 authored by Elliott Hughes's avatar Elliott Hughes Committed by Gerrit Code Review
Browse files

Merge "Move frameworks/base off private libcore.ICU API."

parents ce7fa780 570f44b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -527,7 +527,7 @@ public class DatePicker extends FrameLayout {
        mSpinners.removeAllViews();
        // We use numeric spinners for year and day, but textual months. Ask icu4c what
        // order the user's locale uses for that combination. http://b/7207103.
        String pattern = ICU.getBestDateTimePattern("yyyyMMMdd", Locale.getDefault().toString());
        String pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), "yyyyMMMdd");
        char[] order = ICU.getDateFormatOrder(pattern);
        final int spinnerCount = order.length;
        for (int i = 0; i < spinnerCount; i++) {
+2 −3
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.text.format.DateFormat;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
@@ -32,8 +33,6 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

import libcore.icu.ICU;

public class DateView extends TextView {
    private static final String TAG = "DateView";

@@ -90,7 +89,7 @@ public class DateView extends TextView {
        if (mDateFormat == null) {
            final String dateFormat = getContext().getString(R.string.system_ui_date_pattern);
            final Locale l = Locale.getDefault();
            final String fmt = ICU.getBestDateTimePattern(dateFormat, l.toString());
            final String fmt = DateFormat.getBestDateTimePattern(l, dateFormat);
            mDateFormat = new SimpleDateFormat(fmt, l);
        }