summaryrefslogtreecommitdiff
path: root/core/java/android/widget/DateTimeView.java
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-01-14 15:48:27 -0800
committerElliott Hughes <enh@google.com>2013-01-14 15:48:27 -0800
commit4caba61ea0433099fc94e61221d02542c34e9e3a (patch)
treefa60b4f6d9b70a07b3477e9ca2dd7b1f8494387a /core/java/android/widget/DateTimeView.java
parentd13b23a436075262cc83f7502f7159de24546003 (diff)
Switch over to getting 12-/24-hour time formats from CLDR via icu4c.
I removed the duplication in DateTimeView rather than fix that copy of the code. Bug: 7924970 Change-Id: I60c205d06ad3b50fd2f5d5fc432e4eb186f9c0e7
Diffstat (limited to 'core/java/android/widget/DateTimeView.java')
-rw-r--r--core/java/android/widget/DateTimeView.java10
1 files changed, 1 insertions, 9 deletions
diff --git a/core/java/android/widget/DateTimeView.java b/core/java/android/widget/DateTimeView.java
index 6e6e4af2cf36..af6bbcb5dad0 100644
--- a/core/java/android/widget/DateTimeView.java
+++ b/core/java/android/widget/DateTimeView.java
@@ -189,15 +189,7 @@ public class DateTimeView extends TextView {
}
private DateFormat getTimeFormat() {
- int res;
- Context context = getContext();
- if (android.text.format.DateFormat.is24HourFormat(context)) {
- res = R.string.twenty_four_hour_time_format;
- } else {
- res = R.string.twelve_hour_time_format;
- }
- String format = context.getString(res);
- return new SimpleDateFormat(format);
+ return android.text.format.DateFormat.getTimeFormat(getContext());
}
private DateFormat getDateFormat() {