(self, out, subcommand, *args)
| 78 | return getattr(self, name) |
| 79 | |
| 80 | def parse(self, out, subcommand, *args): |
| 81 | if subcommand == Dumpsys.MEMINFO: |
| 82 | self.parseMeminfo(out) |
| 83 | elif subcommand == Dumpsys.GFXINFO: |
| 84 | if Dumpsys.RESET in args: |
| 85 | # Actually, reset does not need to parse anything |
| 86 | pass |
| 87 | elif Dumpsys.FRAMESTATS in args: |
| 88 | self.parseGfxinfoFramestats(out) |
| 89 | else: |
| 90 | self.parseGfxinfo(out) |
| 91 | elif subcommand == Dumpsys.ACTIVITY: |
| 92 | self.activity = out |
| 93 | elif subcommand == Dumpsys.PACKAGE: |
| 94 | if len(args) > 0 and Dumpsys.isPackageName(args[0]): |
| 95 | self.parsePackage(out) |
| 96 | else: |
| 97 | self.package['out'] = out |
| 98 | elif subcommand == '-l': |
| 99 | # list dumpsys subcommands |
| 100 | self.out = out |
| 101 | else: |
| 102 | self.out = out |
| 103 | |
| 104 | @staticmethod |
| 105 | def isPackageName(name): |
no test coverage detected