mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Opt: Faster local emulator connection on uiautomator2
This commit is contained in:
parent
2fff81ff0d
commit
85fbbcbc42
@ -248,7 +248,10 @@ class ConnectionAttr:
|
||||
device = u2.connect(self.serial)
|
||||
else:
|
||||
# Normal uiautomator2
|
||||
device = u2.connect(self.serial)
|
||||
if self.serial.startswith('emulator-') or self.serial.startswith('127.0.0.1:'):
|
||||
device = u2.connect_usb(self.serial)
|
||||
else:
|
||||
device = u2.connect(self.serial)
|
||||
|
||||
# Stay alive
|
||||
device.set_new_command_timeout(604800)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user