mirror of
https://github.com/mvt-project/mvt.git
synced 2024-06-26 14:28:54 +00:00
Fixing battery stats history parsing
This commit is contained in:
parent
fec6210d1b
commit
3fe5d8dc8d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user