mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-22 16:23:43 +08:00
Opt: Faster local emulator connection on uiautomator2
This commit is contained in:
@@ -248,7 +248,10 @@ class ConnectionAttr:
|
|||||||
device = u2.connect(self.serial)
|
device = u2.connect(self.serial)
|
||||||
else:
|
else:
|
||||||
# Normal uiautomator2
|
# 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
|
# Stay alive
|
||||||
device.set_new_command_timeout(604800)
|
device.set_new_command_timeout(604800)
|
||||||
|
|||||||
Reference in New Issue
Block a user