1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 18:21:14 +00:00

target/androidassistant: Fix Logcat poller creation

Threads cannot be restarted therfore we need to create a new polling
thread for each time the poller is started.
This commit is contained in:
Marc Bonnici 2018-02-07 09:32:03 +00:00 committed by setrofim
parent 07cd770288
commit 728057dbba

View File

@ -49,15 +49,14 @@ class AndroidAssistant(object):
def __init__(self, target, logcat_poll_period=None):
self.target = target
self.logcat_poll_period = logcat_poll_period
self.logcat_poller = None
if self.target.is_rooted:
self.disable_selinux()
if logcat_poll_period:
self.logcat_poller = LogcatPoller(target, logcat_poll_period)
else:
self.logcat_poller = None
def start(self):
if self.logcat_poller:
if self.logcat_poll_period:
self.logcat_poller = LogcatPoller(self.target, self.logcat_poll_period)
self.logcat_poller.start()
def stop(self):