Skip to content

Commit 4bb9b84

Browse files
committed
Don't run adb to dump if using UiAutomatorHelper
- UiAutomatorHelper dump is already UTF-8, don't encode
1 parent 613bd5f commit 4bb9b84

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

.idea/AndroidViewClient.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/com/dtmilano/android/viewclient.py

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

21-
__version__ = '12.4.4'
21+
__version__ = '12.4.5'
2222

2323
import sys
2424
import warnings
@@ -3256,12 +3256,11 @@ def dump(self, window=-1, sleep=1):
32563256
# NOTICE:
32573257
# Using /dev/tty this works even on devices with no sdcard
32583258
cmd = 'uiautomator dump %s /dev/tty >/dev/null' % ('--compressed' if api >= 18 and self.compressedDump else '')
3259-
if DEBUG_UI_AUTOMATOR:
3260-
print >> sys.stderr, "executing '%s'" % cmd
3261-
received = self.device.shell(cmd)
3262-
if received:
3259+
if DEBUG_UI_AUTOMATOR:
3260+
print >> sys.stderr, "executing '%s'" % cmd
3261+
received = self.device.shell(cmd)
32633262
received = unicode(received, encoding='utf-8', errors='replace')
3264-
else:
3263+
if not received:
32653264
raise RuntimeError('ERROR: Empty UiAutomator dump was received')
32663265
if DEBUG:
32673266
self.received = received

0 commit comments

Comments
 (0)