-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMonkeyTest.py
More file actions
29 lines (22 loc) · 752 Bytes
/
Copy pathMonkeyTest.py
File metadata and controls
29 lines (22 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import threading
from util import WifiKeeper
from util import StatusBarCover
from monkey import MonkeyThread
from core import MultiProcess
def keep_status_bar_cover_alive(dev):
"""
keep sending 'turn on status bar cover' broadcast, for the cover effect is not very perfect
:param dev: device id to process
:return: None
"""
StatusBarCover.switch_cover(dev, True)
threading.Timer(5, keep_status_bar_cover_alive, [dev]).start()
def main_process(*args):
# todo
dev = args[0]
WifiKeeper.start_wifi_keeper(dev, True)
StatusBarCover.start_status_bar_cover(dev, True)
keep_status_bar_cover_alive(dev)
MonkeyThread.monkey_work(dev)
if __name__ == '__main__':
MultiProcess.run(main_process, False)