* 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
* Replace tentative resources with real ones.
* Show the notification for each device as per request from UX.
BUG=26625702
Change-Id: Ibcfe7075e4827d5aee216ce5c0007f6dd4572efe
Previously IllegalStateException is thrown in app fuse main loop, if the
loop thread starts just after closing device FD.
BUG=None
Change-Id: Ia5232857d29f9f324446aa38acf3c062f359d406
* Use try-with-resource block to ensure close auto-closeable stream.
* Define local variables just above the place where they are used.
BUG=None
Change-Id: I9d6c952ebac096c51567a4a787b2bc9fff6502de
* 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
The CL was previously reviewed at ag/842930.
> We can obtain detailed information of MtpEvent from devices. e.g. object
> handle of changed object. The CL adds the detailed information as
> properties of MtpEvent class.
>
> BUG=26480986
Change-Id: I93afad9caf118d74cd0923d70242133c4fb2a648
* Integrate two while loops waiting for valid device.
* Try to open a device just after getting an device ownership so that
other applicaitons do not steal device ownership before TestUtil
opens a device.
Change-Id: Ia273cfb2a47fe630efd8c54b22d6ef5823a402b8
Because not all MTP devices support getPartialObject, we need to check
supported operation of MTP devices. The CL adds operationsSupported
field to MtpDeviceInfo class.
BUG=26147375
Change-Id: Iaad968fb4497a5ad11bf6489097abea99c3cbac7
Previously MtpDocumentsProvider used to remove device info in the
database when the device is closed. It loses a chance that RootScanner
handles the removal of roots. As a result, notifications for root cursor
does not issued.
The CL stops removing device info at MtpDocumentsProvider, and let
RootScanner remove it.
BUG=26321346
Change-Id: I6aec0cf843a1e5c93e7f67a718cabd26841d9799
The test for readEvent cancelling was flakiness because it can
successfully receives an event before the test tries to cancel it.
Change-Id: Ie7625dff53e07b8bc9888da03e78155e683a6d46
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
Previously the while loop condition refers to Thread.interrupted()
wrongly. The Thread.interrupted() flag is cleared when the
InterupptedException is thrown.
BUG=26297698
Change-Id: I113d5c88389d54a4a6e29af2cf9515b1693b59dc
The CL updates MtpDocumentsProvider#queryRoots so that it fetches
devices from Database as well as storages when we don't have storages
under the device, or when we have multiple storages under the device.
BUG=26120019
Change-Id: Id2b140f00a1d49fa4da7e17d2564dbbaa1795e1e
I suspected that the commit was conflicted with ag/833494, but actually it wasn't. Let me reland this CL again.
This reverts commit b63e8c6ccc1425d56f8b9c801f4bddf906d694e5.
Change-Id: I4e734422ce10ef93ee7c4ef3b8b72a81beaa769b
methods.
The integrated methods will be used to add device documents as well as
root/child documents.
BUG=26175081
Change-Id: Ibf474cfbc41df402a2958e9efcdd0061f07f5ced
Currently all document roots represent MTP storage, but we will not have
this assumption after starting show MTP devices (not storage) as
document roots.
To distinguish these two types of roots, the CL adds document type
column to the document table in MtpDatabase.
BUG=26120019
Change-Id: I6ee930008aea0b43c1c42b21a198b07eccbd443d
Previously it skips the device permission check by referring package
name. The CL removes the special case and use general MANAGE_USB
system-only permission to skip USB device permission dialog.
BUG=26048722
Change-Id: I3702393a50696209499d1e5f6549dab9fb2cefe4