Merge "adbd: avoid starting multiple worker threads."

am: 5ddd49eeae

Change-Id: I156d55438484681782bef2490c637026b5ab47a9
This commit is contained in:
Josh Gao 2019-05-02 14:28:22 -07:00 committed by android-build-merger
commit dcfc785d20
1 changed files with 4 additions and 0 deletions

View File

@ -310,11 +310,13 @@ struct UsbFfsConnection : public Connection {
if (bound) {
LOG(WARNING) << "received FUNCTIONFS_BIND while already bound?";
running = false;
break;
}
if (enabled) {
LOG(WARNING) << "received FUNCTIONFS_BIND while already enabled?";
running = false;
break;
}
bound = true;
@ -324,11 +326,13 @@ struct UsbFfsConnection : public Connection {
if (!bound) {
LOG(WARNING) << "received FUNCTIONFS_ENABLE while not bound?";
running = false;
break;
}
if (enabled) {
LOG(WARNING) << "received FUNCTIONFS_ENABLE while already enabled?";
running = false;
break;
}
enabled = true;