Fix SettingsXml start tag logic

Don't move to next tag if the current tag is the START_TAG. The initial
implementation assumed domain verification state would write to a new
XML file, but it ended up being stuffed into packages.xml, so the
start tag is already read in the initial switch that calls into
DomainVerificationService.

Bug: 180527086

Test: atest DomainVerificationPersistenceTest

Change-Id: I623afb08985bf5377cb9ae240805aae5db9cd820
This commit is contained in:
Winson
2021-02-17 13:09:23 -08:00
parent 197e2169b1
commit ede1a4fc13

View File

@@ -181,7 +181,10 @@ public class SettingsXml {
}
private void moveToFirstTag() throws IOException, XmlPullParserException {
// Move to first tag
if (mParser.getEventType() == XmlPullParser.START_TAG) {
return;
}
int type;
//noinspection StatementWithEmptyBody
while ((type = mParser.next()) != XmlPullParser.START_TAG