Merge "adbd: demote CHECKs to warning logs."
This commit is contained in:
commit
16f4a033c3
1 changed files with 36 additions and 12 deletions
|
|
@ -304,33 +304,57 @@ struct UsbFfsConnection : public Connection {
|
||||||
|
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case FUNCTIONFS_BIND:
|
case FUNCTIONFS_BIND:
|
||||||
CHECK(!bound) << "received FUNCTIONFS_BIND while already bound?";
|
if (bound) {
|
||||||
CHECK(!enabled) << "received FUNCTIONFS_BIND while already enabled?";
|
LOG(WARNING) << "received FUNCTIONFS_BIND while already bound?";
|
||||||
bound = true;
|
running = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (enabled) {
|
||||||
|
LOG(WARNING) << "received FUNCTIONFS_BIND while already enabled?";
|
||||||
|
running = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bound = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FUNCTIONFS_ENABLE:
|
case FUNCTIONFS_ENABLE:
|
||||||
CHECK(bound) << "received FUNCTIONFS_ENABLE while not bound?";
|
if (!bound) {
|
||||||
CHECK(!enabled) << "received FUNCTIONFS_ENABLE while already enabled?";
|
LOG(WARNING) << "received FUNCTIONFS_ENABLE while not bound?";
|
||||||
enabled = true;
|
running = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (enabled) {
|
||||||
|
LOG(WARNING) << "received FUNCTIONFS_ENABLE while already enabled?";
|
||||||
|
running = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
enabled = true;
|
||||||
StartWorker();
|
StartWorker();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FUNCTIONFS_DISABLE:
|
case FUNCTIONFS_DISABLE:
|
||||||
CHECK(bound) << "received FUNCTIONFS_DISABLE while not bound?";
|
if (!bound) {
|
||||||
CHECK(enabled) << "received FUNCTIONFS_DISABLE while not enabled?";
|
LOG(WARNING) << "received FUNCTIONFS_DISABLE while not bound?";
|
||||||
enabled = false;
|
}
|
||||||
|
|
||||||
|
if (!enabled) {
|
||||||
|
LOG(WARNING) << "received FUNCTIONFS_DISABLE while not enabled?";
|
||||||
|
}
|
||||||
|
|
||||||
|
enabled = false;
|
||||||
running = false;
|
running = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FUNCTIONFS_UNBIND:
|
case FUNCTIONFS_UNBIND:
|
||||||
CHECK(!enabled) << "received FUNCTIONFS_UNBIND while still enabled?";
|
if (enabled) {
|
||||||
CHECK(bound) << "received FUNCTIONFS_UNBIND when not bound?";
|
LOG(WARNING) << "received FUNCTIONFS_UNBIND while still enabled?";
|
||||||
bound = false;
|
}
|
||||||
|
|
||||||
|
if (!bound) {
|
||||||
|
LOG(WARNING) << "received FUNCTIONFS_UNBIND when not bound?";
|
||||||
|
}
|
||||||
|
|
||||||
|
bound = false;
|
||||||
running = false;
|
running = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue