Commit Graph

8 Commits

Author SHA1 Message Date
Daichi Hirono
19aa93249e Fix Identifier.equals method.
Previously the string was compared by ==.

BUG=26970351

Change-Id: If88b74392955388c9bf59002f2d2a186c2dff71a
2016-02-04 14:19:52 +09:00
Daichi Hirono
6a5ea7eae8 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
2016-02-03 15:53:48 +09:00
Daichi Hirono
9e8a4fa78f Change ID format of MtpDocumentsProvider.
BUG=25704562

Change-Id: I5d9fc167512eee06964650e07206e226173611b2
2015-11-26 11:09:46 +09:00
Daichi Hirono
47eb192b27 Start using MtpDatabase in DocumentLoader.
BUG=25704514

Change-Id: I4d9247c148679ee7e40a1a03443e4c0299b1e44d
2015-11-17 15:46:40 +09:00
Tomasz Mikolajewski
bb430fa930 Remove MtpDocument.
Change-Id: Ie4b0e55f6ff2c7b323cf767a5ed3d3c61c12734d
2015-09-01 09:25:30 +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
50d17aa871 Implement queryRoot method of MtpDocumentsProvider.
BUG=20274999

Change-Id: I27aa8bffe47eab6ea1f4195023dbacb6e2f76548
2015-07-29 14:38:11 +09:00