diff options
author | Julia Reynolds <juliacr@google.com> | 2015-07-17 15:54:03 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-17 15:54:10 +0000 |
commit | 593aca12c2f7bf39ca8d4ae944f36a88bd4a48cf (patch) | |
tree | c441b86b04baddb0790517cf4c5e284eed492572 /packages | |
parent | 5fe22e4fcbc543aa588d739b2453b3fa72d31859 (diff) | |
parent | c11d838bc51d731ef80ab6e72b8df1c8a5d7a823 (diff) | |
download | frameworks_base-593aca12c2f7bf39ca8d4ae944f36a88bd4a48cf.zip frameworks_base-593aca12c2f7bf39ca8d4ae944f36a88bd4a48cf.tar.gz frameworks_base-593aca12c2f7bf39ca8d4ae944f36a88bd4a48cf.tar.bz2 |
Merge "Support 24 clock displays in demo mode." into mnc-dev
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java index 04c626b..61986ad 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java @@ -232,7 +232,13 @@ public class Clock extends TextView implements DemoMode { } else if (hhmm != null && hhmm.length() == 4) { int hh = Integer.parseInt(hhmm.substring(0, 2)); int mm = Integer.parseInt(hhmm.substring(2)); - mCalendar.set(Calendar.HOUR, hh); + boolean is24 = DateFormat.is24HourFormat( + getContext(), ActivityManager.getCurrentUser()); + if (is24) { + mCalendar.set(Calendar.HOUR_OF_DAY, hh); + } else { + mCalendar.set(Calendar.HOUR, hh); + } mCalendar.set(Calendar.MINUTE, mm); } setText(getSmallTime()); |