Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66c569ba authored by Josh Gao's avatar Josh Gao Committed by android-build-merger
Browse files

Merge "adbd: respond to device-to-host control transfers." into qt-dev am: 8ef22b10

am: 527d6dd7

Change-Id: I8d91db587a8deaed282f566e4c4fa1e1b821c954
parents 6deec990 527d6dd7
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -380,7 +380,12 @@ struct UsbFfsConnection : public Connection {
                                  << ", wLength = " << static_cast<int>(event.u.setup.wLength);

                        if ((event.u.setup.bRequestType & USB_DIR_IN)) {
                            LOG(WARNING) << "received a device-to-host control transfer, ignoring";
                            LOG(INFO) << "acking device-to-host control transfer";
                            ssize_t rc = adb_write(control_fd_.get(), "", 0);
                            if (rc != 0) {
                                PLOG(ERROR) << "failed to write empty packet to host";
                                break;
                            }
                        } else {
                            std::string buf;
                            buf.resize(event.u.setup.wLength + 1);