am 5568e0e4
: Merge "Move frameworks/base off private libcore.ICU API."
* commit '5568e0e45fff7ffe5061770cb527b22d09cf5519': Move frameworks/base off private libcore.ICU API.
This commit is contained in:
@ -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++) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user