1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

android: Fix typo in ApkInfo

Change self.aapt into self._aapt
This commit is contained in:
Douglas Raillard 2024-01-16 16:12:02 +00:00 committed by Marc Bonnici
parent 4589b4698e
commit 46219ace04

View File

@ -156,7 +156,7 @@ class ApkInfo(object):
# pylint: disable=too-many-branches # pylint: disable=too-many-branches
def parse(self, apk_path): def parse(self, apk_path):
output = self._run([self.aapt, 'dump', 'badging', apk_path]) output = self._run([self._aapt, 'dump', 'badging', apk_path])
for line in output.split('\n'): for line in output.split('\n'):
if line.startswith('application-label:'): if line.startswith('application-label:'):
self.label = line.split(':')[1].strip().replace('\'', '') self.label = line.split(':')[1].strip().replace('\'', '')
@ -196,7 +196,7 @@ class ApkInfo(object):
@property @property
def activities(self): def activities(self):
if self._activities is None: if self._activities is None:
cmd = [self.aapt, 'dump', 'xmltree', self._apk_path] cmd = [self._aapt, 'dump', 'xmltree', self._apk_path]
if self._aapt_version == 2: if self._aapt_version == 2:
cmd += ['--file'] cmd += ['--file']
cmd += ['AndroidManifest.xml'] cmd += ['AndroidManifest.xml']
@ -215,7 +215,7 @@ class ApkInfo(object):
extracted = z.extract('classes.dex', tmp_dir) extracted = z.extract('classes.dex', tmp_dir)
except KeyError: except KeyError:
return [] return []
dexdump = os.path.join(os.path.dirname(self.aapt), 'dexdump') dexdump = os.path.join(os.path.dirname(self._aapt), 'dexdump')
command = [dexdump, '-l', 'xml', extracted] command = [dexdump, '-l', 'xml', extracted]
dump = self._run(command) dump = self._run(command)