From b9ff444a7eaf7ffd43970c0477110c6808bd4a7c Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Fri, 19 Nov 2010 11:20:19 -0500 Subject: PTP: Improve performance and reliability of file importing Now the file copy is done completely within the media process rather than pushing data to the client via ContProvider.openFile(). File system writes are now interleaved with USB reads, which allows us to copy the data faster and prevents the camera from timing out during transfer. File is automatically inserted in the media provider after a successful import and a Uri is returned to the client. BUG: 2994234 Change-Id: Ie75c63da76f623343d3d966c6a707aa1ae871972 Signed-off-by: Mike Lockwood --- media/mtp/MtpDevice.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'media/mtp/MtpDevice.h') diff --git a/media/mtp/MtpDevice.h b/media/mtp/MtpDevice.h index 57f492f..720502c 100644 --- a/media/mtp/MtpDevice.h +++ b/media/mtp/MtpDevice.h @@ -86,12 +86,9 @@ public: MtpProperty* getDevicePropDesc(MtpDeviceProperty code); - // returns the file descriptor for a pipe to read the object's data - int readObject(MtpObjectHandle handle, int objectSize); + bool readObject(MtpObjectHandle handle, const char* destPath); private: - friend class ReadObjectThread; - bool sendRequest(MtpOperationCode operation); bool sendData(); bool readData(); -- cgit v1.1