summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpPacket.cpp
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
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-4/+4
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-3/+3
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* MTP host: Use usb_device_bulk_transfer for synchronous transfersMike Lockwood2011-02-141-6/+7
| | | | | Change-Id: Icf42ea0e5a848cee1565da49713ee9ad0db9f1a6 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: changes to use new usb_request support in libusbhostMike Lockwood2011-01-061-4/+4
| | | | | 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/+11
| | | | | | | 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: Implement GetPartialObject commandMike Lockwood2010-11-231-2/+2
| | | | | | | Allows host to read partial contents of files on the device Change-Id: I74927f7394224d674e1d150a4b72a51d9358459b Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: replace printfs with logcatMike Lockwood2010-06-301-12/+26
| | | | | Change-Id: I2c30921098e2dc049dc5fc1e0a548ead33c363e0 Signed-off-by: Mike Lockwood <lockwood@android.com>
* PTP host: Implement getObjectHandles and getObjectInfo commandsMike Lockwood2010-05-191-1/+0
| | | | | Change-Id: I3ff6e52237f400b4e50c534a1f964c80789bfe98 Signed-off-by: Mike Lockwood <lockwood@android.com>
* More work on PTP host support.Mike Lockwood2010-05-191-0/+1
| | | | | Change-Id: Ifbd5bd5efa3cdb750ae1a2aae38181457554d34d Signed-off-by: Mike Lockwood <mike@spruce.(none)>
* Move MTP code to the android namespaceMike Lockwood2010-05-141-0/+4
| | | | | Change-Id: I5da48038fd5e4cdeefaeba42cdc74eb588b3448d Signed-off-by: Mike Lockwood <lockwood@android.com>
* Checkpoint work on MTP and PTP investigation.Mike Lockwood2010-05-131-0/+136
This change includes work in progress on a C++ library for both host and device MTP and PTP support. Currently the makefile builds two test programs: mtptest - a command line test program that implements a small subset of device side MTP. Requires a kernel driver that has not been checked in yet. ptptest - a host tool to test USB host support for detecting and communicating with digital cameras over PTP. Runs on Linux host. Later this will be reformulated as a native library that will be used in the media process. Change-Id: I81aab279975b600b59d99013ab97f9adf0b58da7 Signed-off-by: Mike Lockwood <lockwood@android.com>