diff options
author | Almaz Mingaleev <mingaleev@google.com> | 2022-07-26 12:36:12 +0100 |
---|---|---|
committer | Almaz Mingaleev <mingaleev@google.com> | 2022-07-26 13:08:41 +0100 |
commit | a315ab6824c0786c256c19fceba30097860d0086 (patch) | |
tree | 9bb8ad472d7e1692a4c858bc9af83a6a0b90a23f /sax | |
parent | 6e1ac19115f788110d929e3c4c40951da2428bc3 (diff) | |
download | base-a315ab6824c0786c256c19fceba30097860d0086.tar.gz |
Remove Time use.
Time is deprecated and there are better alternatives.
Bug: 16550209
Test: atest FrameworksSaxTests
Change-Id: I301d1075b4b64c4586c2e4d7d9b0a12e609fe064
Diffstat (limited to 'sax')
-rw-r--r-- | sax/tests/saxtests/src/android/sax/SafeSaxTest.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sax/tests/saxtests/src/android/sax/SafeSaxTest.java b/sax/tests/saxtests/src/android/sax/SafeSaxTest.java index e8cf2f748c88..a68fc9ab2290 100644 --- a/sax/tests/saxtests/src/android/sax/SafeSaxTest.java +++ b/sax/tests/saxtests/src/android/sax/SafeSaxTest.java @@ -26,7 +26,6 @@ import android.sax.TextElementListener; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.LargeTest; import android.test.suitebuilder.annotation.SmallTest; -import android.text.format.Time; import android.util.Log; import android.util.Xml; import com.android.internal.util.XmlUtils; @@ -39,6 +38,7 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; +import java.time.Instant; import com.android.frameworks.saxtests.R; @@ -225,8 +225,7 @@ public class SafeSaxTest extends AndroidTestCase { .setEndTextElementListener(new EndTextElementListener() { public void end(String body) { // TODO(tomtaylor): programmatically get the timezone - video.dateAdded = new Time(Time.TIMEZONE_UTC); - video.dateAdded.parse3339(body); + video.dateAdded = Instant.parse(body); } }); @@ -472,8 +471,7 @@ public class SafeSaxTest extends AndroidTestCase { if (uri.equals(ATOM_NAMESPACE)) { if (localName.equals("published")) { // TODO(tomtaylor): programmatically get the timezone - video.dateAdded = new Time(Time.TIMEZONE_UTC); - video.dateAdded.parse3339(takeText()); + video.dateAdded = Instant.parse(takeText()); return; } @@ -532,7 +530,7 @@ public class SafeSaxTest extends AndroidTestCase { public float rating; // ranges from 0.0 to 5.0 public Boolean triedToLoadThumbnail; public String authorName; - public Time dateAdded; + public Instant dateAdded; public String category; public String tags; public String description; |