History log of /frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/MtpFileWriter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f4e7fa80384ac72d0228ca5de6e949a9162cefbf 28-Mar-2016 Daichi Hirono <hirono@google.com> Use AppFuse to write document.

Previously MtpDocumentsProvider used pipes to transfer bytes from an
application to the provider when writing a document. The problem was
application could not ensure that the last chunk of bytes was
successfully written to MTP device, since pipes had been already closed
when the provider transferred bytes to MTP device. Though the provider
encountered an error, the provider could not report the error to an
application.

The CL switches the method to transfer bytes from pipes to AppFuse. Now
application can flush() bytes on the file descriptor, and flush will not
complete until the provider completes writing bytes to MTP device.

Fixed: 23093747
Change-Id: I4e28f8cbf19d6c97e591943349a7535241d768f7
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/MtpFileWriter.java