Merge "adbconnection: silence logspam." am: ff08a51a72 am: b9a10d4538

Change-Id: I591c8d81a67d6412132e4569d9ca0e4583708f95
This commit is contained in:
Josh Gao 2020-04-18 03:22:46 +00:00 committed by Automerger Merge Worker
commit 1efd363be5

View file

@ -140,7 +140,13 @@ AdbConnectionClientContext* adbconnection_client_new(
int rc = connect(ctx->control_socket_.get(), reinterpret_cast<sockaddr*>(&addr), addr_len);
if (rc != 0) {
PLOG(ERROR) << "failed to connect to jdwp control socket";
if (errno == ECONNREFUSED) {
// On userdebug devices, every Java process is debuggable, so if adbd is explicitly turned
// off, this would spew enormous amounts of red-herring errors.
LOG(DEBUG) << "failed to connect to jdwp control socket, adbd not running?";
} else {
PLOG(ERROR) << "failed to connect to jdwp control socket";
}
return nullptr;
}