Skip to content

Commit b8ab551

Browse files
committed
Update adbclient.py
This place should be 18. Sdk version 18 don't support arg 'duration', I tested 5 devices. Only api level >=19 support the arg 'duration'.
1 parent f772da8 commit b8ab551

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/com/dtmilano/android/adb/adbclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ def drag(self, (x0, y0), (x1, y1), duration, steps=1, orientation=-1):
771771
version = self.getSdkVersion()
772772
if version <= 15:
773773
raise RuntimeError('drag: API <= 15 not supported (version=%d)' % version)
774-
elif version <= 17:
774+
elif version <= 18:
775775
self.shell('input swipe %d %d %d %d' % (x0, y0, x1, y1))
776776
else:
777777
self.shell('input touchscreen swipe %d %d %d %d %d' % (x0, y0, x1, y1, duration))

0 commit comments

Comments
 (0)