1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 10:11:17 +00:00

Merge pull request #389 from setrofim/next

idle: makes sure screen is off if was off before
This commit is contained in:
marcbonnici 2017-05-15 10:48:19 +01:00 committed by GitHub
commit 1da244552f

View File

@ -63,8 +63,7 @@ class IdleWorkload(Workload):
def setup(self, context):
if self.target.os == 'android':
if self.screen_off:
self.old_screen_state = self.target.is_screen_on()
self.old_screen_state = self.target.is_screen_on()
self.target.ensure_screen_is_on()
self.target.homescreen()
if self.screen_off:
@ -89,3 +88,5 @@ class IdleWorkload(Workload):
self.target.sleep(1)
if self.screen_off and self.old_screen_state:
self.target.ensure_screen_is_on()
elif not self.screen_off and not self.old_screen_state:
self.target.ensure_screen_is_off()