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

utils/android: Allow instantiating an ApkInfo object without a path.

Do not assume that a path is provided upon creating of an ApkInfo
instance and only attempt to extract information if present.
This commit is contained in:
Marc Bonnici 2020-06-03 17:32:49 +01:00 committed by setrofim
parent f7b7aaf527
commit c25852b210

View File

@ -152,7 +152,11 @@ class ApkInfo(object):
self.version_code = None self.version_code = None
self.native_code = None self.native_code = None
self.permissions = [] self.permissions = []
self.parse(path) self._apk_path = None
self._activities = None
self._methods = None
if path:
self.parse(path)
# pylint: disable=too-many-branches # pylint: disable=too-many-branches
def parse(self, apk_path): def parse(self, apk_path):