commit | c11d838bc51d731ef80ab6e72b8df1c8a5d7a823 | [log] [tgz] |
---|---|---|
author | Julia Reynolds <juliacr@google.com> | Thu Jul 16 14:40:37 2015 -0400 |
committer | Julia Reynolds <juliacr@google.com> | Thu Jul 16 14:40:37 2015 -0400 |
tree | 3e221e3f14de6211413cdc53cdf7c7e7d3a1098c | |
parent | dbdf7c45380f7701e029a279932d2c97bf55fdc9 [diff] [blame] |
Support 24 clock displays in demo mode. Bug: 22388468 Change-Id: I0a9f1c214a1612dbc225386ae8777a1480dd14b0
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 @@ } 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());