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
MtpManagerTest uses real MTP device to test functionallity, but
previously it did not handle Android M's USB client behavior.
BUG=25939006
Change-Id: I53fa8c08c41c3adacf85f24694afdea5ec0781ca
When the provider is created, it reopens MTP devices that are recorded
in the database. It enables the provider to resume MTP session after the
provider process is killed by the system.
BUG=25704854
Change-Id: I58ae80fdb2e02cb0f045c63c4ade8943e2baae06
ContentProvider is a singleton of the process. So it may live longer
than Service. We could not close database when the service is destroyed.
BUG=25730042
Change-Id: I591250c1a1e7c5705eb2585c71cac2598c0c0fb9