diff options
author | Elliott Hughes <enh@google.com> | 2015-12-14 12:43:52 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-12-14 12:43:52 -0800 |
commit | 40f80e25d3f399ece26d5f1ac145921ccb7f5f80 (patch) | |
tree | 444430a79a0a268930c4303e0a8b0647efedb2d8 /adb/transport.cpp | |
parent | 4bbed77aaf4dfa813112e5539ee6c00e1b7257d9 (diff) | |
parent | efd8c3289ed80dbae0813b06fb283b29273bbc66 (diff) | |
download | core-40f80e25d3f399ece26d5f1ac145921ccb7f5f80.tar.gz core-40f80e25d3f399ece26d5f1ac145921ccb7f5f80.tar.bz2 core-40f80e25d3f399ece26d5f1ac145921ccb7f5f80.zip |
Merge "Share the new adb USB diagnostic code with fastboot."
am: efd8c3289e
* commit 'efd8c3289ed80dbae0813b06fb283b29273bbc66':
Share the new adb USB diagnostic code with fastboot.
Diffstat (limited to 'adb/transport.cpp')
-rw-r--r-- | adb/transport.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/adb/transport.cpp b/adb/transport.cpp index d4f60ece4..6020ad5b1 100644 --- a/adb/transport.cpp +++ b/adb/transport.cpp @@ -35,6 +35,7 @@ #include "adb.h" #include "adb_utils.h" +#include "diagnose_usb.h" static void transport_unref(atransport *t); @@ -674,11 +675,9 @@ atransport* acquire_one_transport(TransportType type, const char* serial, adb_mutex_lock(&transport_lock); for (const auto& t : transport_list) { if (t->connection_state == kCsNoPerm) { +#if ADB_HOST *error_out = UsbNoPermissionsLongHelpText(); - // If we couldn't figure out a reasonable help message default to something generic. - if (error_out->empty()) { - *error_out = "insufficient permissions for device"; - } +#endif continue; } @@ -759,10 +758,7 @@ const std::string atransport::connection_state_name() const { case kCsDevice: return "device"; case kCsHost: return "host"; case kCsRecovery: return "recovery"; - case kCsNoPerm: { - std::string message = UsbNoPermissionsShortHelpText(); - return message.empty() ? "no permissions" : message; - } + case kCsNoPerm: return UsbNoPermissionsShortHelpText(); case kCsSideload: return "sideload"; case kCsUnauthorized: return "unauthorized"; default: return "unknown"; |