Tomasz Mikolajewski
7f2aba0fb9
Merge "Wire uploading to MtpDocumentsProvider."
2015-08-21 01:08:12 +00:00
Tomasz Mikolajewski
87763e6a91
Wire uploading to MtpDocumentsProvider.
...
This patch does not yet allow to upload files, but uploading (creating)
directories already works.
Bug: 22545670
Change-Id: If4d5a53aa26f791475bb1a783e0ac9540d6760c1
2015-08-20 11:34:44 +09:00
Daichi Hirono
831c5a1e43
Merge "Extract task list operations from MTP DocumentLoader to the internal task list class."
2015-08-20 01:10:18 +00:00
Daichi Hirono
d40b030ad5
Extract task list operations from MTP DocumentLoader to the internal task list class.
...
BUG=23067619
Change-Id: I8dc6f50f2e8927fe38b992e4135009f36acf3079
2015-08-19 13:53:06 +09:00
Steve McKay
743d554a07
Merge "Add comment to argument in MtpDocumentsProvider#openDocumentThumbnail."
2015-08-18 17:13:46 +00:00
Daichi Hirono
b1870e922e
Handle null value returned by MtpDevice#getRoots.
...
BUG=23169303
Change-Id: I9602dda01f3b8919a471c1f4c88acdd19f391684
2015-08-17 18:17:33 +09:00
Daichi Hirono
8b9024f0c2
Add RootScanner to MtpDocumentsProvider to handle new/removed MTP storages.
...
BUG=23169303
Change-Id: I5a73da7f869fed2fcf69e6ab7b039d1a60b883e2
2015-08-14 17:14:52 +09:00
Daichi Hirono
630be43c1c
Merge "Let MTPDocumentsProvider load documents in background thread."
2015-08-13 06:50:12 +00:00
Daichi Hirono
6baa16e910
Let MTPDocumentsProvider load documents in background thread.
...
The CL introduce DocumentLoader class that has a responsibility for loading
documents on background thread. When the provider is requested documents and the
result is not cached, it returns the cursor containing the first 10 items with
extra loading flag. Then it loads the rest of documents into cache on background
thread and notifies update regularly.
BUG=23067619
Change-Id: I7ac9d919bc3ffee1960ae3e8e7272a792a982ea8
2015-08-13 15:47:19 +09:00
Daichi Hirono
2ff024f497
Start to use importFile to file descriptor.
...
BUG=22908937
Change-Id: Ia4f01099816e7841e364d46c125542d006cd47a6
2015-08-12 17:37:04 +09:00
Daichi Hirono
573c1fbc5f
Add comment to argument in MtpDocumentsProvider#openDocumentThumbnail.
...
BUG=20274999
Change-Id: Ibfda61812c0c26f923f939836f483f26b964be0e
2015-08-11 19:31:30 +09:00
Daichi Hirono
124d060bc9
Implement MtpDocumentsProvider#queryChildDocuemnts.
...
BUG=20274999
Change-Id: Ib18e0f36aa97add1c4b603fe11e9adedfef157ec
2015-08-11 18:08:07 +09:00
Daichi Hirono
3faa43a4a6
Implement MtpDocumentsProvider#openDocumentThumbnail.
...
BUG=20274999
Change-Id: I4ee43d94d92735e07786dfe557eaca69e8bff6c3
2015-08-06 16:03:06 +09:00
Tomasz Mikolajewski
52652ac7a5
Make reading files streamed in MtpDocumentsProvider.
...
Change-Id: If5ca4fc71cf27a2eccb46865421235790623985a
2015-08-06 13:15:19 +09:00
Daichi Hirono
5fecc6cf03
Implement MtpDocumentsProvider#deleteDocument.
...
BUG=20274999
Change-Id: I6d07280ddbb0809d3c1334aec5fcbc0c67c4c2aa
2015-08-05 15:59:24 +09:00
Daichi Hirono
8ba419119d
Implement MtpDocuments#openDocument.
...
BUG=20274999
Change-Id: Iebcee84cb47ac521412b15f91903922953cbd3a8
2015-08-05 15:21:57 +09:00
Daichi Hirono
11bd3cbd2d
Random fix for Identity class.
...
* Change separator for ID from ':' to '_' so that the ID can be used as a file
name in FAT.
* Implements equals and hashCode methods.
BUG=20274999
Change-Id: Ibb83151f7d6bdb0c993622dddeb89723aecfa264
2015-08-04 15:07:28 +09:00
Daichi Hirono
e5323b7493
Implement MtpDocumentsProvider#queryDocument.
...
BUG=20274999
Change-Id: Id5c81f744ea1e28d0a0d352b52db1c33fd5edcc2
2015-07-31 11:19:28 +09:00
Daichi Hirono
6ee4a1c124
Rename MtpManagerMock with TestMtpManager.
...
BUG=20274999
Change-Id: I0db6609ed7cde211d0e174a5cd88ca7551ea64ae
2015-07-31 10:30:05 +09:00
Daichi Hirono
beac2184ab
Extract common initialization of MtpDocumentsProviderTest into setUp method.
...
BUG=20274999
Change-Id: Ib8e6907b17d89842bac85e9850bfad301bf51fe6
2015-07-29 19:31:34 +09:00
Daichi Hirono
09109567e9
Add test for queryRoots.
...
BUG=20274999
Change-Id: Iea9ca7514d29bb9dcb9c1ef83ff5554f5dc41901
2015-07-29 19:27:22 +09:00
Daichi Hirono
50d17aa871
Implement queryRoot method of MtpDocumentsProvider.
...
BUG=20274999
Change-Id: I27aa8bffe47eab6ea1f4195023dbacb6e2f76548
2015-07-29 14:38:11 +09:00
Daichi Hirono
d30c9d1302
Remove local flag for proguard.
...
Now default configuration of proguard can handle internal VisibleForTesting
annotation. We don't need to have local configuration.
BUG=20274999
Change-Id: Ib21e07336e48dda71d0d2644ddd86422414f7524
2015-07-28 14:30:07 +09:00
Daichi Hirono
df3f2e6fdd
Add ReceiverActivity to MtpDocumentsProvider.
...
To show the application chooser for the UsbManager.ACTION_USB_DEVICE_ATTACHED
intent, the intent should be received by activity. The activity has NoDisplay
theme and immediately terminate after routing intent to MtpDocumentsService.
BUG=20274999
Change-Id: I2080ea433b1657dd68640681664adbf92d1d30e9
2015-07-28 13:06:17 +09:00
Daichi Hirono
2efe4cac49
Add MtpDocumentsService.
...
BUG=20274999
Change-Id: I1d60ebcf100767136ac7f78e619021776c6be02f
2015-07-28 12:49:11 +09:00
Daichi Hirono
21c20ad32c
Implement openDevice/closeDevice method of MtpManager.
...
BUG=20274999
Change-Id: Ic7f269ca76bd33ef14023b3791b37e0bec1212a8
2015-07-24 10:50:47 +09:00
Daichi Hirono
d5152429e1
Add openDevice and closeDevice methods to MtpDocumentsProvider.
...
These methods will be called in the following CL from the service that handles
USB attach and detach intent.
BUG=20274999
Change-Id: I7b3c658afc5750d6a2713c07f40c59b26dcd1460
2015-07-24 10:50:08 +09:00
Daichi Hirono
9a05d6b87a
Add test package for MTPDocumentsProvider.
...
BUG=20274999
Change-Id: I179692d3b14392a0634d4c0ace21a9d96a2d0d6a
2015-07-09 15:39:22 +09:00
Daichi Hirono
c00d5d4d82
Create package directory for MtpDocumentProvider.
...
BUG=20274999
Change-Id: I7e0727e28b8e0ef2909d86f7ba6eddc2bec8911d
2015-06-11 17:35:14 +09:00