From 95244dd6c0e7ccb85a32eaac94ecb3376fb3a095 Mon Sep 17 00:00:00 2001 From: dianlujitao Date: Tue, 26 Mar 2019 11:07:51 +0800 Subject: Transfer /dev/mtp_usb fd ownership when instancing MtpDevHandle /dev/mtp_usb was opened before instancing MtpDevHandle, the existing fd should be passed in otherwise MtpDevHandle::start would be blocked as it attempted to open the device twice. Change-Id: I6afc5b6926930dad77aceac2f6a00e1c6759a883 --- mtp/ffs/MtpDevHandle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mtp/ffs/MtpDevHandle.h') diff --git a/mtp/ffs/MtpDevHandle.h b/mtp/ffs/MtpDevHandle.h index 4b0692889..4ea1fdb2e 100644 --- a/mtp/ffs/MtpDevHandle.h +++ b/mtp/ffs/MtpDevHandle.h @@ -25,7 +25,7 @@ private: android::base::unique_fd mFd; public: - MtpDevHandle(); + MtpDevHandle(int controlFd); ~MtpDevHandle(); int read(void *data, size_t len); int write(const void *data, size_t len); -- cgit v1.2.3