Bug 1218993 - [mozdevice] do not repeat wait-for-device in adb commands, r=gbrown.

This commit is contained in:
Bob Clary 2015-10-28 23:21:47 -07:00
parent edf5a87f64
commit 19d1ec83c1
2 changed files with 14 additions and 2 deletions

View File

@ -1853,7 +1853,13 @@ class ADBDevice(ADBCommand):
to determine if the device has completed booting.
"""
self.command_output(["reboot"], timeout=timeout)
self.command_output(["wait-for-device"], timeout=timeout)
# command_output automatically inserts a 'wait-for-device'
# argument to adb. Issuing an empty command is the same as adb
# -s <device> wait-for-device. We don't send an explicit
# 'wait-for-device' since that would add duplicate
# 'wait-for-device' arguments which is an error in newer
# versions of adb.
self.command_output([], timeout=timeout)
return self.is_device_ready(timeout=timeout)
@abstractmethod

View File

@ -78,7 +78,13 @@ class ADBAndroid(ADBDevice):
:raises: * ADBTimeoutError
* ADBError
"""
self.command_output(["wait-for-device"], timeout=timeout)
# command_output automatically inserts a 'wait-for-device'
# argument to adb. Issuing an empty command is the same as adb
# -s <device> wait-for-device. We don't send an explicit
# 'wait-for-device' since that would add duplicate
# 'wait-for-device' arguments which is an error in newer
# versions of adb.
self.command_output([], timeout=timeout)
pm_error_string = "Error: Could not access the Package Manager"
pm_list_commands = ["packages", "permission-groups", "permissions",
"instrumentation", "features", "libraries"]