Skip to content

Commit a9fb142

Browse files
committed
Use --compressed in dump only for API >= 18
1 parent d06b295 commit a9fb142

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/dtmilano/android/viewclient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@author: Diego Torres Milano
1919
'''
2020

21-
__version__ = '9.6.0'
21+
__version__ = '9.6.1'
2222

2323
import sys
2424
import warnings
@@ -1982,7 +1982,7 @@ def dump(self, window=-1, sleep=1):
19821982
if self.useUiAutomator:
19831983
# NOTICE:
19841984
# Using /dev/tty this works even on devices with no sdcard
1985-
received = unicode(self.device.shell('uiautomator dump --compressed /dev/tty >/dev/null'), encoding='utf-8', errors='replace')
1985+
received = unicode(self.device.shell('uiautomator dump %s /dev/tty >/dev/null' % ('--compressed' if self.getSdkVersion() >= 18 else '')), encoding='utf-8', errors='replace')
19861986
if not received:
19871987
raise RuntimeError('ERROR: Empty UiAutomator dump was received')
19881988
if DEBUG:

0 commit comments

Comments
 (0)