Merge "Remove Time use." am: c2e6b1cc84 am: a90eff342e am: 1537f9d90a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2164084

Change-Id: I7aad91dd966e25a2f72b7da4bf48233dad9ecb79
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Almaz Mingaleev
2022-07-26 16:38:33 +00:00
committed by Automerger Merge Worker

View File

@@ -26,7 +26,6 @@ import android.sax.TextElementListener;
import android.test.AndroidTestCase; import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.LargeTest; import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.SmallTest; import android.test.suitebuilder.annotation.SmallTest;
import android.text.format.Time;
import android.util.Log; import android.util.Log;
import android.util.Xml; import android.util.Xml;
import com.android.internal.util.XmlUtils; import com.android.internal.util.XmlUtils;
@@ -39,6 +38,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.time.Instant;
import com.android.frameworks.saxtests.R; import com.android.frameworks.saxtests.R;
@@ -225,8 +225,7 @@ public class SafeSaxTest extends AndroidTestCase {
.setEndTextElementListener(new EndTextElementListener() { .setEndTextElementListener(new EndTextElementListener() {
public void end(String body) { public void end(String body) {
// TODO(tomtaylor): programmatically get the timezone // TODO(tomtaylor): programmatically get the timezone
video.dateAdded = new Time(Time.TIMEZONE_UTC); video.dateAdded = Instant.parse(body);
video.dateAdded.parse3339(body);
} }
}); });
@@ -472,8 +471,7 @@ public class SafeSaxTest extends AndroidTestCase {
if (uri.equals(ATOM_NAMESPACE)) { if (uri.equals(ATOM_NAMESPACE)) {
if (localName.equals("published")) { if (localName.equals("published")) {
// TODO(tomtaylor): programmatically get the timezone // TODO(tomtaylor): programmatically get the timezone
video.dateAdded = new Time(Time.TIMEZONE_UTC); video.dateAdded = Instant.parse(takeText());
video.dateAdded.parse3339(takeText());
return; return;
} }
@@ -532,7 +530,7 @@ public class SafeSaxTest extends AndroidTestCase {
public float rating; // ranges from 0.0 to 5.0 public float rating; // ranges from 0.0 to 5.0
public Boolean triedToLoadThumbnail; public Boolean triedToLoadThumbnail;
public String authorName; public String authorName;
public Time dateAdded; public Instant dateAdded;
public String category; public String category;
public String tags; public String tags;
public String description; public String description;