mirror of
https://github.com/mvt-project/mvt.git
synced 2026-09-28 04:02:13 +02:00
Fixing battery stats history parsing
This commit is contained in:
@@ -43,4 +43,3 @@ class DumpsysAccessibility(AndroidExtraction):
|
|||||||
log.info("Found installed accessibility service \"%s\"", result.get("service"))
|
log.info("Found installed accessibility service \"%s\"", result.get("service"))
|
||||||
|
|
||||||
self.log.info("Identified a total of %d accessibility services", len(self.results))
|
self.log.info("Identified a total of %d accessibility services", len(self.results))
|
||||||
|
|
||||||
|
|||||||
@@ -46,4 +46,3 @@ class DumpsysDBInfo(AndroidExtraction):
|
|||||||
|
|
||||||
self.log.info("Extracted a total of %d records from database information",
|
self.log.info("Extracted a total of %d records from database information",
|
||||||
len(self.results))
|
len(self.results))
|
||||||
|
|
||||||
|
|||||||
@@ -42,16 +42,8 @@ class BatteryHistory(BugReportModule):
|
|||||||
return
|
return
|
||||||
|
|
||||||
lines = []
|
lines = []
|
||||||
in_batterystats = False
|
|
||||||
in_history = False
|
in_history = False
|
||||||
for line in content.decode(errors="ignore").splitlines():
|
for line in content.decode(errors="ignore").splitlines():
|
||||||
if line.strip() == "********** Print latest newbatterystats **********":
|
|
||||||
in_batterystats = True
|
|
||||||
continue
|
|
||||||
|
|
||||||
if not in_batterystats:
|
|
||||||
continue
|
|
||||||
|
|
||||||
if line.strip().startswith("Battery History "):
|
if line.strip().startswith("Battery History "):
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
in_history = True
|
in_history = True
|
||||||
|
|||||||
Reference in New Issue
Block a user