Avoid hidden DataFormat.is24Hour field access

DateFormat.is24Hour is not part of the CorePlatformApi but
DateFormat.set24HourTimePref(Boolean) is. Switch over.

Bug: 113148576
Test: build
Change-Id: I27103890f94cfe3679f386ea33b0450b453a7625
This commit is contained in:
Neil Fuller
2018-10-10 19:13:19 +01:00
parent 8a79748b0c
commit 4df6279128

View File

@@ -117,7 +117,7 @@ public class DateUtilsTest {
@Test
public void testFormatSameDayTime() {
// This test assumes a default DateFormat.is24Hour setting.
DateFormat.is24Hour = null;
DateFormat.set24HourTimePref(null);
Date date = new Date(109, 0, 19, 3, 30, 15);
long fixedTime = date.getTime();