mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
Workload: Makes APK starting activity optional
The starting activity is not always listed in an apk or required to start an application to its default state, for example youtube. Therefore now the starting activity will only be used if one is available.
This commit is contained in:
parent
1b93a4162b
commit
d6f18466c9
@ -515,9 +515,12 @@ class PackageHandler(object):
|
||||
self.apk_version = host_version
|
||||
|
||||
def start_activity(self):
|
||||
cmd = 'am start -W -n {}/{}'
|
||||
output = self.target.execute(cmd.format(self.apk_info.package,
|
||||
self.apk_info.activity))
|
||||
if not self.apk_info.activity:
|
||||
cmd = 'am start -W {}'.format(self.apk_info.package)
|
||||
else:
|
||||
cmd = 'am start -W -n {}/{}'.format(self.apk_info.package,
|
||||
self.apk_info.activity)
|
||||
output = self.target.execute(cmd)
|
||||
if 'Error:' in output:
|
||||
# this will dismiss any error dialogs
|
||||
self.target.execute('am force-stop {}'.format(self.apk_info.package))
|
||||
|
Loading…
x
Reference in New Issue
Block a user