From 1b03920ca7d576c8400dd006ac1bbdecc1664231 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Fri, 30 Jan 2015 10:08:48 -0600 Subject: MTP: make MTP work even if unplugged and replugged Set up a loop to keep trying to open / read the MTP device so that MTP will work even if the device is unplugged during boot or unplugged and replugged in. Change-Id: I0d3a3b7c91ce84a8cbed16caa4b15efee35b3641 --- mtp/MtpServer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mtp/MtpServer.h') diff --git a/mtp/MtpServer.h b/mtp/MtpServer.h index 61f5ccfac..944331134 100755 --- a/mtp/MtpServer.h +++ b/mtp/MtpServer.h @@ -92,7 +92,7 @@ private: android::Vector mObjectEditList; public: - MtpServer(int fd, MtpDatabase* database, bool ptp, + MtpServer(MtpDatabase* database, bool ptp, int fileGroup, int filePerm, int directoryPerm); virtual ~MtpServer(); @@ -102,7 +102,7 @@ public: void addStorage(MtpStorage* storage); void removeStorage(MtpStorage* storage); - void run(); + void run(int fd); void sendObjectAdded(MtpObjectHandle handle); void sendObjectRemoved(MtpObjectHandle handle); -- cgit v1.2.3