63 Commits

Author SHA1 Message Date
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