History log of /frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
07f48ad0dfe8d0b01f56cd33c06ad87c178e0123 01-May-2016 Daichi Hirono <hirono@google.com> Do not terminate AppFuse message loop when FUSE_FORGET.

Currently AppFuse tries to terminate its message loop when it receives
FUSE_FORGET. But kernel continues to dispatch messages after FUSE_FORGET
and it should not terminate AppFuse meesage loop.

Change-Id: I070a71c35a8d80bcaaf7603305d219e65be97bc9
Fixes: 28508169
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
d0ef1394d295209b6693c1a8ced1a70cef0082eb 08-Apr-2016 Daichi Hirono <hirono@google.com> Remove LOG_NDEBUG 0 from AppFuse JNI.

"LOG_NDEBUG 0" enforces to output verbose log even for release build.

Change-Id: I9ab2f5b86065d360222cbabc8d6be2431b06d785
Fix: 28055420
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
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/jni/com_android_mtp_AppFuse.cpp
09ece6c68bdaf3a04b517f04dff6a3272b54b2b2 20-Jan-2016 Daichi Hirono <hirono@google.com> Implement FUSE_WRITE command in app fuse.

The CL adds a handler for FUSE_WRITE command which invokes a Java
handler.

BUG=23093747

Change-Id: I1903fca6b5663e6241ad540a89fe812310ba6810
(cherry picked from commit 35693da25af11583053d4af6a70d4acbf446978d)
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
2f310f6d5d352817f42384394b50a660ad6e0bf8 26-Jan-2016 Daichi Hirono <hirono@google.com> Reuse buffer when reading bytes from files.

Previously AppFuse getObjectBytes returns byte array and the array's
length needs to equals to the exact number of bytes the method read.

The CL change the function signature so that it can return the number of
read bytes. And reuse a buffer array instead of slicing the array with
valid length.

BUG=None

Change-Id: I78b714554cac9ae71b895cb8929bc98969f5a8ca
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
b36b15586a5d3d0de590773ce4392fa3a82af66a 25-Jan-2016 Daichi Hirono <hirono@google.com> Fix bugs that prevent from using AppFuse.

* Allow buffer size that is greater than requested read size in JNI,
because we reuse fixed-size buffer among multiple requests.
* Fix condition to check if the file size is greater than 4GB or
not. We need to use 0xffffffffl instead of 0xffffffff because
0xffffffff is int and its value is -1.

BUG=None
Change-Id: I155916e139353b15dc1ab535234faf50d942996d
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
af6b66529e8d053b5d8ffdfe886dc32b7f6ed30e 20-Jan-2016 Daichi Hirono <hirono@google.com> Ensure to release local reference in AppFuse JNI.

Previously get_object_bytes() leaked local reference of Java buffer
array.

BUG=None

Change-Id: Ic27e57281f984fee4aa285ad21de522ccb0fe4ed
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
e6054c0ff07005c73bd10a362f039933dc00f8bd 20-Jan-2016 Daichi Hirono <hirono@google.com> Fix race in AppFuseTest.

Previously IllegalStateException is thrown in app fuse main loop, if the
loop thread starts just after closing device FD.

BUG=None

Change-Id: Ia5232857d29f9f324446aa38acf3c062f359d406
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
fab4a97a7964020d76ebcb6d13817b6985cb3744 15-Jan-2016 Daichi Hirono <hirono@google.com> Fix compile error introduced by ag/842950.

BUG=25756419

Change-Id: I8ac270946b3915c02b21a07cf0a9c5b62d69effc
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
2153e822eeb77b64288abf824551afa63491c0ea 11-Jan-2016 Daichi Hirono <hirono@google.com> Fix AppFuse JNI.

* Return attributes for all files as well as root.
* Fix buffer size for reading and add a check for reading size.

BUG=25756419

Change-Id: I572f718bc01d96616ec94f85d800b8b57eedd2ea
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
cc9a7d78d519aa25b4afbc96afd401be75696dda 28-Oct-2015 Daichi Hirono <hirono@google.com> Implement FUSE operations in AppFuse JNI.

The CL adds the following operations.

* FUSE_LOOKUP
* FUSE_OPEN
* FUSE_READ
* FUSE_RELEASE
* FUSE_FLUSH

BUG=25756145

Change-Id: Ib57d7d0ade3343a604a1c40e4b2c2a2d089f3715
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
91e3b50636f48f0860fa7576f185fb36ec4e6dc7 16-Dec-2015 Daichi Hirono <hirono@google.com> Unmount appfuse when the device FD is closed.

The CL lets MountService to observe device FD, and request unmount to
vold when the device FD was closed, or remote application providing
appfuse is crashed.

BUG=25756420

Change-Id: I7990694d32affa7f89e3f40badb25098d74d744d
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
01cf378e045dafe136cda39f5559ae1c36119f5b 21-Dec-2015 Daichi Hirono <hirono@google.com> Fix compiler error on com_android_mtp_AppFuse.cpp.

The CL adds explicit assigning for reply_size to prevent 'unused'
compiler error.

Change-Id: I307758debb23b5bf56ddf71d54813b8cd81d8f49
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp
bee50c05439191d88df37f20749fff1c700d9684 14-Dec-2015 Daichi Hirono <hirono@google.com> Add AppFuse class and its JNI module.

BUG=25756145

Change-Id: I10597e3377cf860412e006a118cd979b6f108af3
/frameworks/base/packages/MtpDocumentsProvider/jni/com_android_mtp_AppFuse.cpp