13 Commits

Author SHA1 Message Date
Mike Lockwood
215b682b8a MTP: changes to use new usb_request support in libusbhost
Change-Id: Ic091eab166a66efcde0395dcebbbc513f2322fca
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-06 11:46:55 -05:00
Mike Lockwood
bfd1d72a1a MTP host: Handle receiving a response packet instead of data packet.
This will happen if the device needs to report an error rather than returning the data.

Change-Id: I477512b3676c2f0518a85a4135832ed4475fbc2d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-09 18:34:18 -08:00
Mike Lockwood
a194cc7d8b MTP: Support format argument in host GetObjectPropDesc command
Change-Id: Ic14313c0f95bea1d1d475cc6a001b256fccb91c8
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-07 18:53:04 -08:00
Mike Lockwood
e4880e421f MTP: Improve MtpProperty logging support
Change-Id: I46800b99763edcc5e994d912941f9f5e9b1c94d2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-07 17:13:12 -08:00
Mike Lockwood
5768f1089b MTP: Host support for GetObjectPropsSupported and GetObjectPropDesc
Change-Id: I6fd23587597fc68227dfb61118b097eda3e3e1d5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-07 10:58:56 -08:00
Mike Lockwood
929b3da2fc PTP: Fix permissions problems with files imported via PTP
Change-Id: I630a89c67e5b3d6d0c29e6c257f84e1909fa4de2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-19 13:55:22 -05:00
Mike Lockwood
954c267725 PTP: Improve performance and reliability of file importing
Now the file copy is done completely within the media process
rather than pushing data to the client via ContProvider.openFile().

File system writes are now interleaved with USB reads, which allows us
to copy the data faster and prevents the camera from timing out during transfer.

File is automatically inserted in the media provider after a successful import
and a Uri is returned to the client.

BUG: 2994234

Change-Id: Ie75c63da76f623343d3d966c6a707aa1ae871972
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-19 11:30:10 -05:00
Mike Lockwood
bc4cb0bc79 MTP host: Add support for reading files from an MTP device via ParcelFileDescriptor
Also added some support for sending files to the device that hasn't been debugged yet.
Add locking to MtpDevice to prevent it from attempting multiple transactions simultaneously.

Change-Id: I2b995ba0af086cc6920bd6b8c869f540ad78560a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-26 20:40:45 -04:00
Mike Lockwood
3e6616dd3d MTP: replace printfs with logcat
Change-Id: I2c30921098e2dc049dc5fc1e0a548ead33c363e0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-30 13:59:32 -04:00
Mike Lockwood
e0a89f611d MTP: Add host support for deleting objects.
For example, deleting pictures on a digital camera.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-11 17:47:35 -04:00
Mike Lockwood
dda5686092 MTP: Add support for retrieving thumbnails to MTP content provider.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-10 16:58:03 -04:00
Mike Lockwood
90f4873446 MTP: host support for retrieving device property descriptors
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-07 09:34:41 -04:00
Mike Lockwood
755fd61725 Prototype Content Provider support for MTP/PTP devices.
At this point much of the plumbing is in place, but only a few simple queries
are supported.
This is enough to support a proof of concept sample program that navigates
the file hierarchy of a digital camera connected via USB.

Also removed obsolete ptptest host test program.

Change-Id: I17644344b9f0ce1ecc302bc0478c1f3d44a1647f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-01 22:12:44 -04:00