3edcde295326db07520ed5eedde087c24c16dfd0 |
|
12-Apr-2016 |
Daichi Hirono <hirono@google.com> |
Fix flakiness DocumentLoader#testCancelTask. For testing, we use blockDocument and unblockDocument test mehtods to control flow of DocumentLoader's background thread. Previously testCancelTask may exit before the background thread goes back from blocking, which causes InterruptedException. Fixes: 28125289 Change-Id: Id03826733c5b6f1da66b9280838eb1d2897ed5fc
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
76be46f4d9314fd7daca0985a0a7e02126d85975 |
|
08-Apr-2016 |
Daichi Hirono <hirono@google.com> |
Fix crash when deleting multiple files. When deleting files, MtpDocumentsProvider clears LoadingTask in DocumentsLoader to update directory contents list. Previously it can clear ongoing task, and it skips calling Mapper#stopAddingDocuments. Since Mapper#startAddingDocuments and Mapper#stopAddingDocuments must be called 1 to 1, it causes precondition check failure at the next call of Mapper#startAddingDocuments. Change-Id: I23e2b117da826297e45404be4db4cc29f96e5510 Fix: 28076320
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
678ed36bebb7b0f5ff342e9da30d693bffb8aeb2 |
|
18-Mar-2016 |
Daichi Hirono <hirono@google.com> |
Count error document to complete adding documents to the database. Previously DocumentLoader#LoaderTask had a counter to count loaded documents and completes adding documents to the database. However it does not count documents where a MTP device returns an error for getObjectInfo. The CL fixes the problem to ensure we complete documents loading. BUG=27729653 Change-Id: I696eac790a6535f1bd7a1855dc2d6f932e32eae5
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
61ba923ca0cb5c928a16729d0aa67b6bf4b2f027 |
|
25-Feb-2016 |
Daichi Hirono <hirono@google.com> |
Set document flag by referring MTP supported operations. BUG=26147375 Change-Id: I6c4244f1f1153c1bbbf21ea9d608dc1a92ca70cd
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
0f32537e40ee2662d4f0b7b625ee280ca9c02066 |
|
21-Feb-2016 |
Daichi Hirono <hirono@google.com> |
Stops performing operations that does not supported by MTP device. MTP devices can return supported operation list. The CL sets root flag by referring it. BUG=26147375 Change-Id: I02397821e208cf5a8fcf7457aa279d2818ce24c7
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
4e94b8deaa646f176bad9b80d5924ce64142743e |
|
21-Feb-2016 |
Daichi Hirono <hirono@google.com> |
Resolve unmapped document when the device is connected. Once MTP device is disconnected from Android, the files on MTP device are marked as 'DISCONNECTED' in metadata database. These metadata will be back when MtpDocumentsProvider finds the reconnected MTP device and fetches the files again. Previously the 'DISCONNECTED' files are not automatically refetched. User needs to see files in Documents UI again to reuse document ID of 'DISCONNECTED' files. The CL changes DocumentLoader so that it automatically refetches disconnected documents. BUG=26212981 Change-Id: I5cb2cc9c11af72632e481c59a505794f43ed62ea
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
ebd24051599280443435606cab220de33b9356ad |
|
06-Feb-2016 |
Daichi Hirono <hirono@google.com> |
Use device key to map device documents. The CL introduces MAPPING_KEY column to the database and lets Mapper use the column to map IDs of devices. It also removes the concept of mapping mode from Mapper for simplyfing. Now Mapper just tries to multiple mapping keys (MTP identifier, display name, and mapping key) to find candidate of ID mapping. BUG=26212981 Change-Id: I19f6c7dac146047e9978de4eb33d5076406037ad (cherry picked from commit 637a2010f4a0c0484b13c4cb87aa2858bdf079b2)
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
619afdaae1ec7dcbd71bb1f698a0901a1fa290fe |
|
07-Feb-2016 |
Daichi Hirono <hirono@google.com> |
Check parent existance when adding/removing documents. BUG=26212981 Change-Id: I8109e2324c027ec2182c6f521d57f3fe078a8660 (cherry picked from commit df803ec6ebd47ddc7f97ea8ef13aa359ecc7fb95)
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
f83ccbd7edd32e728785fb7aad44f11886e79645 |
|
04-Feb-2016 |
Daichi Hirono <hirono@google.com> |
Drop device name from storage document name. When device has multiple storages, storage are shown as directory under the device root. In this case, we would not like to add device name to storage. Note that we still use "device name + storage name" for root name if the device has a single storage because we skip storage directory in this case and shows storage's contents directly under the device. BUG=26625708 Change-Id: Ie13b044e71ae9b5131c4a01ee9d605023d05f168
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
6a5ea7eae8a70bced97ceef051c965c27cb642ca |
|
02-Feb-2016 |
Daichi Hirono <hirono@google.com> |
Move logic to skip single storage. The tree structure of MTP model looks like /device/storage/objects. But almost all MTP device has only single storage, so it's redundant to show a single storage as a child of device in UI. MtpDocumentsProvider has a special logic to skip single storage, and shows storage's object as a children of device in such case. Previously the logic was applied when MtpDocumentsProvider returned a root list. The provider returns a storage as a Documents.Root, instead of device if the device has only one storage. However the number of root cannot be obtain for closed device. Thus the previous logic did not work for closed devices that have a single storage. The CL moves the logic from queryRoot to queryChildDocuments. Now MtpDocumentsProvider always returns a device as root, then it returns storage's objects as the device's children, where we has already opened the device. BUG=26481574 Change-Id: I25af0fc220410e321a378d67f226798ec4bba19c
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
81d48536aef702d301cdc3a339008de767b51f99 |
|
16-Dec-2015 |
Daichi Hirono <hirono@google.com> |
Show MTP device as root when it has multiple/zero storages. 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
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
b3fe72bfb288a509a953e5586264ca1c4460d2df |
|
15-Dec-2015 |
Daichi Hirono <hirono@google.com> |
Revert "Revert "Add device document to MtpDatabase."" 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
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
b63e8c6ccc1425d56f8b9c801f4bddf906d694e5 |
|
15-Dec-2015 |
Daichi Hirono <hirono@google.com> |
Revert "Add device document to MtpDatabase." This reverts commit c0ae45be046b1aed005589791e1ee483c399ab1c. Change-Id: I03337324e768c509bdcf94c89f7abe7ca00c8a18
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
c0ae45be046b1aed005589791e1ee483c399ab1c |
|
14-Dec-2015 |
Daichi Hirono <hirono@google.com> |
Add device document to MtpDatabase. BUG=26175081 Change-Id: Ida91c50f7e33d7b300a32ee318b6f3837edf6606
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
7a375c407f2759f21fb4ca7215034f056b4ade1c |
|
14-Dec-2015 |
Daichi Hirono <hirono@google.com> |
Integerate mapping methods for root/child documents into the same methods. The integrated methods will be used to add device documents as well as root/child documents. BUG=26175081 Change-Id: Ibf474cfbc41df402a2958e9efcdd0061f07f5ced
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
259ce80132d55774fe599c60b53a9d9dfc1efa65 |
|
20-Nov-2015 |
Daichi Hirono <hirono@google.com> |
Extract mapping operations to partial class of MtpDatabase. Change-Id: I5fda6d5754206528ad5953bcc179a0ffe0b4982d
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
9e8a4fa78f5b9e3964dca84ad4047210d35c4013 |
|
19-Nov-2015 |
Daichi Hirono <hirono@google.com> |
Change ID format of MtpDocumentsProvider. BUG=25704562 Change-Id: I5d9fc167512eee06964650e07206e226173611b2
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
47eb192b2704e27272ca94a95680cac40b6bff3f |
|
16-Nov-2015 |
Daichi Hirono <hirono@google.com> |
Start using MtpDatabase in DocumentLoader. BUG=25704514 Change-Id: I4d9247c148679ee7e40a1a03443e4c0299b1e44d
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
4604b74603ea951c0f0d0fc2d9b6bd46ae54e245 |
|
11-Nov-2015 |
Daichi Hirono <hirono@google.com> |
Prepare for adding MtpDocumentsProvider tests to APCT. BUG=25093356 Change-Id: I0c194e6bf3abeb632171e9be49471b9d94a0cb4c
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
bb430fa930fa0d0700e46e7b4881de2a252223dd |
|
25-Aug-2015 |
Tomasz Mikolajewski <mtomasz@google.com> |
Remove MtpDocument. Change-Id: Ie4b0e55f6ff2c7b323cf767a5ed3d3c61c12734d
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
87763e6a91a54e7995cfda9b7e80162f02ac4cbc |
|
10-Aug-2015 |
Tomasz Mikolajewski <mtomasz@google.com> |
Wire uploading to MtpDocumentsProvider. This patch does not yet allow to upload files, but uploading (creating) directories already works. Bug: 22545670 Change-Id: If4d5a53aa26f791475bb1a783e0ac9540d6760c1
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
8b9024f0c20b1b79df1f2d0bc2f1a82f726b1176 |
|
11-Aug-2015 |
Daichi Hirono <hirono@google.com> |
Add RootScanner to MtpDocumentsProvider to handle new/removed MTP storages. BUG=23169303 Change-Id: I5a73da7f869fed2fcf69e6ab7b039d1a60b883e2
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|
6baa16e9109046661fef8dcc25b8754ac68bcdae |
|
12-Aug-2015 |
Daichi Hirono <hirono@google.com> |
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
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
|