Resolve XML parser used in tests.

We recently pivoted the default XML parser to write a new binary
XML schema, which requires all users to "resolve" to determine the
correct parser.

Bug: 176037390
Test: atest WmTests:DisplayWindowSettingsProviderTests
Change-Id: I2077821f6812a33ff92c97f481b38d01c4ef7ae0
This commit is contained in:
Jeff Sharkey
2020-12-20 19:27:04 -07:00
parent 612dbde32a
commit c6cf559a59

View File

@@ -312,8 +312,7 @@ public class DisplayWindowSettingsProviderTests extends WindowTestsBase {
private String getStoredDisplayAttributeValue(TestStorage storage, String attr)
throws Exception {
try (InputStream stream = storage.openRead()) {
TypedXmlPullParser parser = Xml.newFastPullParser();
parser.setInput(stream, StandardCharsets.UTF_8.name());
TypedXmlPullParser parser = Xml.resolvePullParser(stream);
int type;
while ((type = parser.next()) != XmlPullParser.START_TAG
&& type != XmlPullParser.END_DOCUMENT) {