diff options
author | Josh Gao <jmgao@google.com> | 2016-04-13 12:18:58 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2016-04-13 13:13:17 -0700 |
commit | 5863fb61e142ec8494443ba341e240f9fe86934b (patch) | |
tree | c31660546c4f2d7ddd4612f4b8d579693037b010 /adb/commandline.cpp | |
parent | 3d8df3cb2a80676b35a0641c03e1164eb876883f (diff) | |
download | core-5863fb61e142ec8494443ba341e240f9fe86934b.tar.gz core-5863fb61e142ec8494443ba341e240f9fe86934b.tar.bz2 core-5863fb61e142ec8494443ba341e240f9fe86934b.zip |
adb: add support for 'wait-for-any'.
Allow waiting for a device in any state.
Bug: http://b/28168212
Change-Id: I1876ecd70089ca88f2da5de4182e13724ec50501
(cherry picked from commit 86441c31fe256f37625743e2818377ce5e3dec05)
Diffstat (limited to 'adb/commandline.cpp')
-rw-r--r-- | adb/commandline.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/adb/commandline.cpp b/adb/commandline.cpp index 9b3c3e275..f904df78d 100644 --- a/adb/commandline.cpp +++ b/adb/commandline.cpp @@ -1057,11 +1057,11 @@ static bool wait_for_device(const char* service, TransportType t, const char* se return false; } - if (components[3] != "bootloader" && components[3] != "device" && components[3] != "recovery" && - components[3] != "sideload") { + if (components[3] != "any" && components[3] != "bootloader" && components[3] != "device" && + components[3] != "recovery" && components[3] != "sideload") { fprintf(stderr, "adb: unknown state %s; " - "expected 'bootloader', 'device', 'recovery', or 'sideload'\n", + "expected 'any', 'bootloader', 'device', 'recovery', or 'sideload'\n", components[3].c_str()); return false; } |