Skip to content

Commit

Permalink
Merge pull request #284 from Marc--Olivier/fix-xml-parsing-error-283
Browse files Browse the repository at this point in the history
Fix XML parsing error when using MIUI 12 on Pocophone X3 #283
  • Loading branch information
dtmilano authored Oct 11, 2020
2 parents 06cefca + f8137ca commit 86f9037
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/dtmilano/android/viewclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -3316,7 +3316,7 @@ def __parseTreeFromUiAutomatorDump(self, receivedXml):
print("__parseTreeFromUiAutomatorDump(", receivedXml[:40], "...)", file=sys.stderr)
parser = UiAutomator2AndroidViewClient(self.device, self.build[VERSION_SDK_PROPERTY], self.uiAutomatorHelper)
try:
start_xml_index = receivedXml.index("<")
start_xml_index = receivedXml.index("<?xml")
end_xml_index = receivedXml.rindex(">")
except ValueError:
raise ValueError("received does not contain valid XML: " + receivedXml)
Expand Down

0 comments on commit 86f9037

Please sign in to comment.