Remove configure() from Mtp
Instead of configuring the server each
time the connection happens, UsbService
will now pass in the control fd with the
descriptors already written. Also, PTP
endpoints have been moved to their own
directory at /dev/usb-ffs/ptp rather than
using the same ones as mtp.
Bug: 72877174
Test: Verify PTP and MTP config changes work
Change-Id: I9a0336afd610aa397c9947568c308afb89b27c08
diff --git a/media/mtp/MtpDevHandle.cpp b/media/mtp/MtpDevHandle.cpp
index 6aa57ac..e8bdf80 100644
--- a/media/mtp/MtpDevHandle.cpp
+++ b/media/mtp/MtpDevHandle.cpp
@@ -60,7 +60,7 @@
return ioctl(mFd, MTP_SEND_EVENT, reinterpret_cast<unsigned long>(&me));
}
-int MtpDevHandle::start() {
+int MtpDevHandle::start(bool /* ptp */) {
mFd.reset(TEMP_FAILURE_RETRY(open(mtp_dev_path, O_RDWR)));
if (mFd == -1) return -1;
return 0;
@@ -70,9 +70,4 @@
mFd.reset();
}
-int MtpDevHandle::configure(bool) {
- // Nothing to do, driver can configure itself
- return 0;
-}
-
} // namespace android