summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Neil Fuller <nfuller@google.com> 2018-10-10 19:13:19 +0100
committer Neil Fuller <nfuller@google.com> 2018-10-10 19:13:19 +0100
commit4df6279128e24c6dccd141d63fc94e166b3f322a (patch)
tree0c9b653c66e021a7e271dc7921bfcb4a947a887d
parent8a79748b0c310ec75b44a5a6e93601c53df706fc (diff)
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
-rw-r--r--core/tests/coretests/src/android/text/format/DateUtilsTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/tests/coretests/src/android/text/format/DateUtilsTest.java b/core/tests/coretests/src/android/text/format/DateUtilsTest.java
index f8e3b4dfec56..872b71a5faa6 100644
--- a/core/tests/coretests/src/android/text/format/DateUtilsTest.java
+++ b/core/tests/coretests/src/android/text/format/DateUtilsTest.java
@@ -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();