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/src/com/android/mtp/DocumentLoader.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/src/com/android/mtp/DocumentLoader.java
|
64111e08d905525c7f4fe27e69953eb71bd62511 |
|
24-Mar-2016 |
Daichi Hirono <hirono@google.com> |
Get object size that is more than 4GB. MtpObjectInfo contains object size as 32-bit integer and the provider needs to invoke MtpDevice#getObjectSizeLong hidden API to get 64-bit object size. The CL switches to use MtpDevice#getObjectSizeLong hidden API if MtpObjectInfo#getCompressedSize() returns 0xffffffffL, which means the object size is more than 4GB. BUG=27805369 Change-Id: I87ea02c09aa784246cf016def309d1f39ed20e90
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java
|
071313e8b55e1ac3349d4f405ffff37b2ae2feb0 |
|
18-Mar-2016 |
Daichi Hirono <hirono@google.com> |
Don't map root documents in DocumentLoader. Root documents must be added by RootScanner. Previously DocumentLoader unintentionally tries to load unmapped root documents, which causes crash. BUG=27731902 Change-Id: I8674473d80d6e7f758f6636d30148f5d2118bc25
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.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/src/com/android/mtp/DocumentLoader.java
|
37a655aac1d61ce2fe346531f78cbcfbf51388e9 |
|
04-Mar-2016 |
Daichi Hirono <hirono@google.com> |
Fix null pointer exception in DocumentLoader. BUG=27489909 Change-Id: I1ebc9953f6db6639241d0c46257d110c5b0eb5b0
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.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/src/com/android/mtp/DocumentLoader.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/src/com/android/mtp/DocumentLoader.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/src/com/android/mtp/DocumentLoader.java
|
cfaab20c24ab1790a6aa353d9a1005b5850a7144 |
|
05-Feb-2016 |
Daichi Hirono <hirono@google.com> |
Fix NullPointerException around getObjectInfo. BUG=27000341 Change-Id: I8888b627c62e9baaf91c19194dc89d95c65b8225
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.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/src/com/android/mtp/DocumentLoader.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/src/com/android/mtp/DocumentLoader.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/src/com/android/mtp/DocumentLoader.java
|
9e8a4fa78f5b9e3964dca84ad4047210d35c4013 |
|
19-Nov-2015 |
Daichi Hirono <hirono@google.com> |
Change ID format of MtpDocumentsProvider. BUG=25704562 Change-Id: I5d9fc167512eee06964650e07206e226173611b2
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java
|
49f920fbde1dce6f789c2d0ad2df014c12e7e3ac |
|
19-Nov-2015 |
Daichi Hirono <hirono@google.com> |
Add new methods to MtpDatabase. * deleteDocument * getParentId * queryDocument * putNewDocument BUG=25756881 Change-Id: Ie223b37e04586b3e2b0448d09e14562fedbb652a
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java
|
47eb192b2704e27272ca94a95680cac40b6bff3f |
|
16-Nov-2015 |
Daichi Hirono <hirono@google.com> |
Start using MtpDatabase in DocumentLoader. BUG=25704514 Change-Id: I4d9247c148679ee7e40a1a03443e4c0299b1e44d
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java
|
4c1d3dde05308cb10187269dd9824c9bfdbb27de |
|
02-Sep-2015 |
Tomasz Mikolajewski <mtomasz@google.com> |
Create PipeManager and DocumentLoader per device. Also, reduce MtpManager's synchronization to per device synchronization. Bug: 23733078 Change-Id: Ieedc7d871f2a4d260ca4287c6fa05d67f54fb4c5
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java
|
81d74743107b372424fb8f7439357bdd608f8caf |
|
01-Sep-2015 |
Tomasz Mikolajewski <mtomasz@google.com> |
Refresh directory changes on Mtp when a child is deleted or created. Change-Id: I0325c60ac142368c2e61fcf9efa751f678f3f3a3
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java
|
bb430fa930fa0d0700e46e7b4881de2a252223dd |
|
25-Aug-2015 |
Tomasz Mikolajewski <mtomasz@google.com> |
Remove MtpDocument. Change-Id: Ie4b0e55f6ff2c7b323cf767a5ed3d3c61c12734d
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java
|
d40b030ad55dfe8cb408fa35e0fb94400e2dcbb8 |
|
17-Aug-2015 |
Daichi Hirono <hirono@google.com> |
Extract task list operations from MTP DocumentLoader to the internal task list class. BUG=23067619 Change-Id: I8dc6f50f2e8927fe38b992e4135009f36acf3079
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.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/src/com/android/mtp/DocumentLoader.java
|