From c25852b210e19df6104812246465ee60d898179c Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Wed, 3 Jun 2020 17:32:49 +0100 Subject: [PATCH] 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. --- devlib/utils/android.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devlib/utils/android.py b/devlib/utils/android.py index 2dbdcef..f165c7f 100755 --- a/devlib/utils/android.py +++ b/devlib/utils/android.py @@ -152,7 +152,11 @@ class ApkInfo(object): self.version_code = None self.native_code = None 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 def parse(self, apk_path):