summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpDevice.h
Commit message (Collapse)AuthorAgeFilesLines
* MTP: add strict bounds checking for all incoming packetsMike Lockwood2014-11-121-1/+1
| | | | | | | | | | | Previously we did not sanity check incoming MTP packets, which could result in crashes due to reading off the edge of a packet. Now all MTP packet getter functions return a boolean result (true for OK, false for reading off the edge of the packet) and we now return errors for malformed packets. Bug: 18113092 Change-Id: Ic7623ee96f00652bdfb4f66acb16a93db5a1c105
* New APIs for MTP and PTP host supportMike Lockwood2011-01-221-6/+8
| | | | | | | This replaces the previous ContentProvider based interface Change-Id: I4cea2544854adb9fdcc04345e4d73d8ef05380f3 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: changes to use new usb_request support in libusbhostMike Lockwood2011-01-061-5/+9
| | | | | Change-Id: Ic091eab166a66efcde0395dcebbbc513f2322fca Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP host: Handle receiving a response packet instead of data packet.Mike Lockwood2010-12-091-0/+2
| | | | | | | 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>
* MTP: Support format argument in host GetObjectPropDesc commandMike Lockwood2010-12-071-1/+1
| | | | | Change-Id: Ic14313c0f95bea1d1d475cc6a001b256fccb91c8 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Improve MtpProperty logging supportMike Lockwood2010-12-071-0/+1
| | | | | Change-Id: I46800b99763edcc5e994d912941f9f5e9b1c94d2 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Host support for GetObjectPropsSupported and GetObjectPropDescMike Lockwood2010-12-071-0/+3
| | | | | Change-Id: I6fd23587597fc68227dfb61118b097eda3e3e1d5 Signed-off-by: Mike Lockwood <lockwood@android.com>
* PTP: Fix permissions problems with files imported via PTPMike Lockwood2010-11-191-2/+4
| | | | | Change-Id: I630a89c67e5b3d6d0c29e6c257f84e1909fa4de2 Signed-off-by: Mike Lockwood <lockwood@android.com>
* PTP: Improve performance and reliability of file importingMike Lockwood2010-11-191-4/+1
| | | | | | | | | | | | | | | | 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>
* MTP host: Add support for reading files from an MTP device via ↵Mike Lockwood2010-07-261-1/+14
| | | | | | | | | | 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>
* MTP: replace printfs with logcatMike Lockwood2010-06-301-0/+2
| | | | | Change-Id: I2c30921098e2dc049dc5fc1e0a548ead33c363e0 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add host support for deleting objects.Mike Lockwood2010-06-111-0/+3
| | | | | | For example, deleting pictures on a digital camera. Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add support for retrieving thumbnails to MTP content provider.Mike Lockwood2010-06-101-0/+1
| | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: host support for retrieving device property descriptorsMike Lockwood2010-06-071-0/+3
| | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* Prototype Content Provider support for MTP/PTP devices.Mike Lockwood2010-06-011-0/+83
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>