summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpDevice.cpp
Commit message (Collapse)AuthorAgeFilesLines
* am e418cfae: am 869e0798: Merge "MTP: add strict bounds checking for all ↵Mike Lockwood2014-11-131-11/+21
|\ | | | | | | | | | | | | incoming packets" into lmp-mr1-dev * commit 'e418cfae0970d1abe60b8cc681aa8c8a828b3769': MTP: add strict bounds checking for all incoming packets
| * MTP: add strict bounds checking for all incoming packetsMike Lockwood2014-11-121-11/+21
| | | | | | | | | | | | | | | | | | | | | | 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
* | MTP Device: Parse USB3 descriptor for MTP initor;Bo Huang2014-09-261-0/+9
|/ | | | | | | | MTP initor in Android only support MTP responder based on USB2. Add support for MTP device based on USB3. Change-Id: I52b7a5ddff8ae3f8c2ce8a802c2cb2865f4e162a Signed-off-by: Bo Huang <bo.b.huang@intel.com>
* media: use size_t for integer iterator to Vector::size()Mark Salyzyn2014-04-151-2/+2
| | | | Change-Id: I0a744dc7815a86a993df9b0623440be620ec8903
* media: 64 bit compile issuesMark Salyzyn2014-04-151-2/+2
| | | | | | | | - change internal sized types to use stdint.h - printf & scanf formats - size_t or unsigned int for iterators Change-Id: Id993a70d8bf54c667c5d652b34179a2c727ed446
* Add mode when open(O_CREAT) is used.Nick Kralevich2012-06-261-1/+1
| | | | | | | | | | When creating a new file using open(..., O_CREAT), it is an error to fail to specify a creation mode. If a mode is not specified, a random stack provided value is used as the "mode". This will become a compile error in a future Android change. Change-Id: I36a3d67d294a915c1f79632a1b0ba45edd1214b1
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-12/+12
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-041-3/+3
| | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-031-5/+5
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-5/+5
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* MtpDevice: Handle zero length packets in readResponse()Mike Lockwood2011-03-141-0/+4
| | | | | | | Bug: 3509060 Change-Id: I291eefeaa667688c9e6e75da74ec3025b84065e9 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP host: disable some test codeMike Lockwood2011-02-151-2/+6
| | | | | Change-Id: I2237ad88f73b03a2c324f17267c52cc42b8a0d5b Signed-off-by: Mike Lockwood <lockwood@android.com>
* Fix some memory leaks found in static analysisKenny Root2011-02-021-14/+40
| | | | Change-Id: Icd630009793c51acfaed45763ef50489ead40024
* Add support for synchronous bulk USB transfersMike Lockwood2011-01-271-5/+5
| | | | | Change-Id: Id5de49e4d728a702fa1583ecc24f83f36cc57d21 Signed-off-by: Mike Lockwood <lockwood@android.com>
* New APIs for MTP and PTP host supportMike Lockwood2011-01-221-5/+215
| | | | | | | 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-23/+35
| | | | | 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-3/+16
| | | | | | | 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-2/+3
| | | | | Change-Id: Ic14313c0f95bea1d1d475cc6a001b256fccb91c8 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Improve MtpProperty logging supportMike Lockwood2010-12-071-5/+40
| | | | | Change-Id: I46800b99763edcc5e994d912941f9f5e9b1c94d2 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Host support for GetObjectPropsSupported and GetObjectPropDescMike Lockwood2010-12-071-0/+35
| | | | | Change-Id: I6fd23587597fc68227dfb61118b097eda3e3e1d5 Signed-off-by: Mike Lockwood <lockwood@android.com>
* PTP: Fix permissions problems with files imported via PTPMike Lockwood2010-11-191-1/+7
| | | | | Change-Id: I630a89c67e5b3d6d0c29e6c257f84e1909fa4de2 Signed-off-by: Mike Lockwood <lockwood@android.com>
* PTP: Improve performance and reliability of file importingMike Lockwood2010-11-191-79/+72
| | | | | | | | | | | | | | | | 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: Implement support for getting/setting device propertiesMike Lockwood2010-09-021-1/+1
| | | | | | | | Added support for the "device friendly name" and "synchonization partner" properties, which are required by Microsoft. Change-Id: Ic0443333d75f7d98a2d902a790b9d505a56d4eef Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP host: Reduce buffer size for readObject so we don't clog our pipe.Mike Lockwood2010-07-271-1/+1
| | | | | Change-Id: I24d2b1551af5843e48c0a63b84925b3a6451e36a Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Turn off excessive loggingMike Lockwood2010-07-271-9/+5
| | | | | Change-Id: Ib0dd8cb99efa324d0b4e742bffeb913d6122ace2 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/+200
| | | | | | | | | | 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: Implement GetObjectPropDescMike Lockwood2010-06-301-1/+1
| | | | | Change-Id: I283651257254fc9cd9d93eab4605c5e33d3db93e Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: replace printfs with logcatMike Lockwood2010-06-301-9/+8
| | | | | Change-Id: I2c30921098e2dc049dc5fc1e0a548ead33c363e0 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add host support for deleting objects.Mike Lockwood2010-06-111-0/+28
| | | | | | 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/+14
| | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: host support for retrieving device property descriptorsMike Lockwood2010-06-071-11/+41
| | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* Prototype Content Provider support for MTP/PTP devices.Mike Lockwood2010-06-011-0/+230
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>