d95d34d49d36a2f27212485c79cde769af3873e9 |
|
04-Oct-2016 |
Daichi Hirono <hirono@google.com> |
Don't send short URB packet when sending MtpDataPacket. When sending a MtpDataPacket to a MTP device, the kernel driver splits it into multiple URB packets so that the URB packet size does not exceed the buffer size at the MTP device. Previously MtpDataPacket sends its header first, then sends the payload. It means the first URB packet only contains the header of MtpDataPacket and the URB packet size is smaller than the maximum URB packet size (short packet). Some MTP devices regard the short packet as the end of the sequencail URB packets, thus the devices do not accept the following URB packets that contain the payload. The MTP spec says if the responder (MTP device) sends the data in a way where the first pacekt contains only the header, the initiator (MTP host) must send data in the same way. Otherwise the initiator must not send a short packet in the sequencial URB packets. The CL fixes the MTP host implementation so that it remembers how the MTP device sends data, and uses the same way when sending data from the host. Bug: 31165557 Test: Manually invokes MtpDevice#sendObject Change-Id: Ic76eb4241ed74957414aef2990be08cd77a9f5a9 (cherry picked from commit d4b4296b401162a7a42f757c96e3652b82255b13)
/frameworks/av/media/mtp/MtpDevice.cpp
|
5c66471ad288640a89188f765fef5b41b4d3daf5 |
|
04-Oct-2016 |
Daichi Hirono <hirono@google.com> |
Stop sending object handle with sendObject request. According to the MTP spec, the sendObject request must follow sendObjectInfo request and we could not send an object handle with sendObject request. The CL stops sending object handle with a sendObject request. Instead it checks if the given object handle equals to the object handle returned by the previous sendObjectInfo request. Bug: 31918048 Test: manually invoked sendObjectInfo and sendObject. Change-Id: I0a80bdf67bf2913522821ac705f3dc548d3edead (cherry picked from commit 8d20945c08dfdd85c252c8ba92d197bf1bd2b208)
/frameworks/av/media/mtp/MtpDevice.cpp
|
66a9abef47f7c8bd438bb1897617ebad3858c736 |
|
24-Mar-2016 |
Daichi Hirono <hirono@google.com> |
Add getObjectPropValue function to MtpDevice. In the MTP spec, the object size is stored in MtpObjectInfo as unsigned 32-bit integer and fetched by the getObjectInfo operation. For the objects that are more than 4GB, the object size is provided as one of extra properties, which are fetched by different operation. The CL adds to getObjectPropValue method to MtpDevice class so that client code can obtain 4GB+ object size from object property. BUG=27805369 Change-Id: I0b91facd07cdc19866cb29f7df08bb1698bcf60b
/frameworks/av/media/mtp/MtpDevice.cpp
|
95faffd31926e2e0b83923c181629d1cea29e88f |
|
23-Mar-2016 |
Daichi Hirono <hirono@google.com> |
Remove redundant code to check container type. The CL removes redundant check for containter type. We have the same check just after the removed check, but the removed check returns opposite value for boolean result of the function. BUG=27805514 Change-Id: Ia8e32c0c38553a9a0ec4d9d726b8cde6281d34e1
/frameworks/av/media/mtp/MtpDevice.cpp
|
b3be006498f28f2630264135e88d266b540bcec3 |
|
24-Feb-2016 |
Daichi Hirono <hirono@google.com> |
Fix compiler warning in media/mtp. BUG=27152673 Change-Id: I0a5a7f2005bd76acf4d09353305b66af3fd29e4b
/frameworks/av/media/mtp/MtpDevice.cpp
|
251322bc8ac7ff7690bf706206c8ef251ca059f2 |
|
02-Feb-2016 |
Jaesung Chung <jaesung@google.com> |
Merge "Retry usb_device_claim_interface when it's connected to the kernel driver"
|
33d58162896868f387416289c8b33266be0a3360 |
|
01-Feb-2016 |
Jaesung Chung <jaesung@google.com> |
Retry usb_device_claim_interface when it's connected to the kernel driver usb_device_claim_interface is called solely for marking that a program or a driver uses it and it does not trigger any signals over the bus. usb_device_claim_interface has a possibility to be failed if the kernel driver already connected to a usb device. When it happens, the function call returns an error and errno is set to EBUSY. For that case, it is necessary to disconnect to the kernel driver and retry to claim the interface again. Bug: 26845384 Change-Id: I4fae0e66ca1132f8cc16937cc6fb837ec4d5659f
/frameworks/av/media/mtp/MtpDevice.cpp
|
610d4a125f0144ec4915e5cef9f53e431cb117af |
|
28-Jan-2016 |
Daichi Hirono <hirono@google.com> |
Add comment for readPartialObject's NULL expected length. BUG=26703522 Change-Id: I584c13e5e5d3f396aa2dfbd351c1c36f7bc0870d
/frameworks/av/media/mtp/MtpDevice.cpp
|
326edd98bbc52d41de6e0943ca8a343228ed87a5 |
|
22-Jan-2016 |
Daichi Hirono <hirono@google.com> |
Add MtpDevice#getPartialObject64 method. This is the method similar to getPartialObject but takes uint64_t as offset. BUG=26703522 Change-Id: I9b8b5f77225b744b527c4a78fe628e88ae89209f
/frameworks/av/media/mtp/MtpDevice.cpp
|
59a90609cc340d2933c119aa47045a5c95530b48 |
|
11-Jan-2016 |
Daichi Hirono <hirono@google.com> |
Reland "Return parameters of event as well as event code." The CL was previously reviewed at ag/842911. > The CL makes MtpDevice#reapEvent return event parameters as well as > event code. > > BUG=26480986 Change-Id: Ie750a58248068cd0e804f20b57e7e86eef19d315
/frameworks/av/media/mtp/MtpDevice.cpp
|
4a7cea889d81bbf8f555df006fe384a405b3ba53 |
|
11-Dec-2015 |
Daichi Hirono <hirono@google.com> |
Add getPartialObject method to MtpDevice. The CL adds getPartialObject operation to MtpDevice (host side implementation). BUG=26284424 Change-Id: Ia8f41b0ebb7dfb4572729eacb5902f21360c8db1
/frameworks/av/media/mtp/MtpDevice.cpp
|
a04e6fa61391f1ef64266579760f315c6b3e70b9 |
|
24-Dec-2015 |
Daichi Hirono <hirono@google.com> |
Fix MtpDevice to read 0-byte object correctly. If a requested object is 0 bytes, the remote MTP device can return MTP_CONTAINER_TYPE_RESPONSE at the first response package. Previous implementation does not handle the case. BUG=26317907 Change-Id: I6ae1138bf1b24aa197575bea0440cc032ffd622a
/frameworks/av/media/mtp/MtpDevice.cpp
|
d6dabe95eb59c3d95f94825d08a6028bab06cbdc |
|
02-Dec-2015 |
Daichi Hirono <hirono@google.com> |
Skip an interface that does not have MTP interface class. The comment says it skips the interface that does not have MTP or PTP interface class, but previously it accepts such interfaces. BUG=25960704 Change-Id: Idba07d4c6432d73cf45d9a3422af0ad18cd1b280
/frameworks/av/media/mtp/MtpDevice.cpp
|
8a7ffae09a019de7109b30c505561c453910bde1 |
|
20-Aug-2015 |
Daichi Hirono <hirono@google.com> |
Add functions to read MTP events from MTP devices. BUG=23368533 Change-Id: I2003dda961339677caf56e57ae90cf6df7bd7430
/frameworks/av/media/mtp/MtpDevice.cpp
|
532b4f23c7e08fdae9fff189c4b565f6216ffd2a |
|
25-Aug-2015 |
Tomasz Mikolajewski <mtomasz@google.com> |
Fix sendObject upload. Two issues are resolved: - sendObject changed to accept raw arguments instead of objectinfo, as calling getObjectInfo after sentObjectInfo is illegal, - send buffer decreased to 16K, as this is the maximum size working per comments in other places. Change-Id: If71644dcbc508dd92c3fe74a2fdb7c6798059b42
/frameworks/av/media/mtp/MtpDevice.cpp
|
4fd9a8b9865addfedbcd84d5c9efea0f647086a0 |
|
20-Aug-2015 |
Daichi Hirono <hirono@google.com> |
Use common implementation for getObject and importFile. Previously the two functions have separate but similar implementation. ag/750097 fixed a bug in importFile, but we have a same bug in getObject. Instead fixing the bug separately, the CL adds a common function that can be used from both getObject and importFile. BUG=23264575 Change-Id: I0bdc876ee9b11301ba4c445cc16556e9c951a8b4
/frameworks/av/media/mtp/MtpDevice.cpp
|
81ca5ade77ea518aa21fdd7434d2db5df088a115 |
|
18-Aug-2015 |
Daichi Hirono <hirono@google.com> |
Read whole data from MTP device even on writing error. Once the object bytes is requested on the MTP client device, the device tries to send whole data of object. We need to read the complete data from the device even when we have errors at the destination file descriptor. Otherwise the object data will be received as a response of next request unintentionally. BUG=23264575 Change-Id: I3369786370022f65aa760dd6b75204a946f712af
/frameworks/av/media/mtp/MtpDevice.cpp
|
64c948bf5041fdfe391553315c9d028e1ee56382 |
|
13-Aug-2015 |
Tomasz Mikolajewski <mtomasz@google.com> |
Fix sending object info in MTP stack. This CL fixes three bugs: 1. Wrong condition, which caused MtpDevice::sendData always return false. 2. Sending data separately was incompatible with the server side, causing receiving only partial data on the server side. 3. Sending uninitialized buffers (sic!) from MtpDevice::sendObjectInfo due to missing call to reset(). 4. Sending corrupted packets from MtpDevice::sendObjectInfo (shifted by 4 bytes) due to missing reset(). 5. Sending incorrect parent in MtpDevice::sendObjectInfo in case of not specified parent. Change-Id: Ia545c66b388ea9a292ba31f6ff034e2467037d92
/frameworks/av/media/mtp/MtpDevice.cpp
|
025ffd9c17a7b30d862436954aa0db8d08bfaa9f |
|
04-Aug-2015 |
Tomasz Mikolajewski <mtomasz@google.com> |
Add support for reading into a file descriptor on MTP devices. This will allow to read files on Java side without copying all bytes to memory first, which is problematic for large files such as movies. Bug:22908937 Change-Id: I67b116cf01d9e44af69f94c8edc64fd8fbf7b9a3
/frameworks/av/media/mtp/MtpDevice.cpp
|
e1e814c7c640a51511b149985d57f8bfd4a8bf78 |
|
13-Nov-2014 |
Mike Lockwood <lockwood@google.com> |
am e418cfae: am 869e0798: Merge "MTP: add strict bounds checking for all incoming packets" into lmp-mr1-dev * commit 'e418cfae0970d1abe60b8cc681aa8c8a828b3769': MTP: add strict bounds checking for all incoming packets
|
ab063847e6e893740749029a04cce1f6b7345ed5 |
|
12-Nov-2014 |
Mike Lockwood <lockwood@google.com> |
MTP: add strict bounds checking for all incoming packets 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
/frameworks/av/media/mtp/MtpDevice.cpp
|
8023f3af62795b7816f36a9423f8e0a39e616e49 |
|
09-Jun-2013 |
Bo Huang <bo.b.huang@intel.com> |
MTP Device: Parse USB3 descriptor for MTP initor; 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>
/frameworks/av/media/mtp/MtpDevice.cpp
|
3ab368e0810d894dcbc0971350c095049478a055 |
|
15-Apr-2014 |
Mark Salyzyn <salyzyn@google.com> |
media: use size_t for integer iterator to Vector::size() Change-Id: I0a744dc7815a86a993df9b0623440be620ec8903
/frameworks/av/media/mtp/MtpDevice.cpp
|
db43b34c3428e480f8c4c66e7e88f4001f37f91e |
|
04-Apr-2014 |
Mark Salyzyn <salyzyn@google.com> |
media: 64 bit compile issues - change internal sized types to use stdint.h - printf & scanf formats - size_t or unsigned int for iterators Change-Id: Id993a70d8bf54c667c5d652b34179a2c727ed446
/frameworks/av/media/mtp/MtpDevice.cpp
|
af8e8aa1ada2948972555592570ec9ad90cbf372 |
|
26-Jun-2012 |
Nick Kralevich <nnk@google.com> |
Add mode when open(O_CREAT) is used. 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
/frameworks/av/media/mtp/MtpDevice.cpp
|
29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47 |
|
06-Jan-2012 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
/frameworks/av/media/mtp/MtpDevice.cpp
|
df64d15042bbd5e0e4933ac49bf3c177dd94752c |
|
04-Jan-2012 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
/frameworks/av/media/mtp/MtpDevice.cpp
|
b8a805261bf0282e992d3608035e47d05a898710 |
|
20-Dec-2011 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
/frameworks/av/media/mtp/MtpDevice.cpp
|
3856b090cd04ba5dd4a59a12430ed724d5995909 |
|
20-Oct-2011 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
/frameworks/av/media/mtp/MtpDevice.cpp
|
3d74457b66533b170606347e60628e55a2af255e |
|
14-Mar-2011 |
Mike Lockwood <lockwood@android.com> |
MtpDevice: Handle zero length packets in readResponse() Bug: 3509060 Change-Id: I291eefeaa667688c9e6e75da74ec3025b84065e9 Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
d4fb52e3031578119ecd53087b1bcb4828c333c5 |
|
15-Feb-2011 |
Mike Lockwood <lockwood@android.com> |
MTP host: disable some test code Change-Id: I2237ad88f73b03a2c324f17267c52cc42b8a0d5b Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
31c52e7c8c01e1db6ff9bcf66135c72544b1235a |
|
02-Feb-2011 |
Kenny Root <kroot@google.com> |
Fix some memory leaks found in static analysis Change-Id: Icd630009793c51acfaed45763ef50489ead40024
/frameworks/av/media/mtp/MtpDevice.cpp
|
f41ef0ee0da4c497352df42d09c3d89940c25e14 |
|
27-Jan-2011 |
Mike Lockwood <lockwood@android.com> |
Add support for synchronous bulk USB transfers Change-Id: Id5de49e4d728a702fa1583ecc24f83f36cc57d21 Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
23f1b33c5f88f07510ca5dc01b3afd7af6843d6c |
|
30-Dec-2010 |
Mike Lockwood <lockwood@android.com> |
New APIs for MTP and PTP host support This replaces the previous ContentProvider based interface Change-Id: I4cea2544854adb9fdcc04345e4d73d8ef05380f3 Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
42d0b79a787814d42e4c6f9dfe14f13cc0f6a758 |
|
04-Jan-2011 |
Mike Lockwood <lockwood@android.com> |
MTP: changes to use new usb_request support in libusbhost Change-Id: Ic091eab166a66efcde0395dcebbbc513f2322fca Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
f7454622eaac287d20ab43013d7015fe42b894f8 |
|
10-Dec-2010 |
Mike Lockwood <lockwood@android.com> |
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>
/frameworks/av/media/mtp/MtpDevice.cpp
|
99e393a39a31bfbdeb435462939519e2d0279433 |
|
08-Dec-2010 |
Mike Lockwood <lockwood@android.com> |
MTP: Support format argument in host GetObjectPropDesc command Change-Id: Ic14313c0f95bea1d1d475cc6a001b256fccb91c8 Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
0c7c7c76a96a82ec728a2d5c091941c4057ffb25 |
|
07-Dec-2010 |
Mike Lockwood <lockwood@android.com> |
MTP: Improve MtpProperty logging support Change-Id: I46800b99763edcc5e994d912941f9f5e9b1c94d2 Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
98693f674125484de8873d969c209276a6dd604b |
|
07-Dec-2010 |
Mike Lockwood <lockwood@android.com> |
MTP: Host support for GetObjectPropsSupported and GetObjectPropDesc Change-Id: I6fd23587597fc68227dfb61118b097eda3e3e1d5 Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
27afe3a1cc9c07ac4884a7720087a597aea3c76f |
|
19-Nov-2010 |
Mike Lockwood <lockwood@android.com> |
PTP: Fix permissions problems with files imported via PTP Change-Id: I630a89c67e5b3d6d0c29e6c257f84e1909fa4de2 Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
b9ff444a7eaf7ffd43970c0477110c6808bd4a7c |
|
19-Nov-2010 |
Mike Lockwood <lockwood@android.com> |
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>
/frameworks/av/media/mtp/MtpDevice.cpp
|
e3e76c456baee122de6715ae280130abaddc906c |
|
02-Sep-2010 |
Mike Lockwood <lockwood@android.com> |
MTP: Implement support for getting/setting device properties 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>
/frameworks/av/media/mtp/MtpDevice.cpp
|
da90dff17b6ce79d0a7d8ab2dbe2aa69cd1c11aa |
|
27-Jul-2010 |
Mike Lockwood <lockwood@android.com> |
MTP host: Reduce buffer size for readObject so we don't clog our pipe. Change-Id: I24d2b1551af5843e48c0a63b84925b3a6451e36a Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
f43c641bf3f8bcb5748f4ae504d434896edc94f5 |
|
27-Jul-2010 |
Mike Lockwood <lockwood@android.com> |
MTP: Turn off excessive logging Change-Id: Ib0dd8cb99efa324d0b4e742bffeb913d6122ace2 Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
0cf89f2e622aa53f31fa5762ca4bc805bb509ed3 |
|
27-Jul-2010 |
Mike Lockwood <lockwood@android.com> |
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>
/frameworks/av/media/mtp/MtpDevice.cpp
|
21ef7d0e70c5ad599bc2602cb484f8cd647055ca |
|
30-Jun-2010 |
Mike Lockwood <lockwood@android.com> |
MTP: Implement GetObjectPropDesc Change-Id: I283651257254fc9cd9d93eab4605c5e33d3db93e Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
b14e588bec4d5e39e61b020b5b575f2ce555d316 |
|
30-Jun-2010 |
Mike Lockwood <lockwood@android.com> |
MTP: replace printfs with logcat Change-Id: I2c30921098e2dc049dc5fc1e0a548ead33c363e0 Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
6afc41d095ccb159f6c4705bed903b6c048b922a |
|
11-Jun-2010 |
Mike Lockwood <lockwood@android.com> |
MTP: Add host support for deleting objects. For example, deleting pictures on a digital camera. Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
3e072b354d1e1e3ee62d58492f0739139df8aff1 |
|
10-Jun-2010 |
Mike Lockwood <lockwood@android.com> |
MTP: Add support for retrieving thumbnails to MTP content provider. Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
a6c490b8b2d96ebaab632286029463f932ae3b6b |
|
06-Jun-2010 |
Mike Lockwood <lockwood@android.com> |
MTP: host support for retrieving device property descriptors Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDevice.cpp
|
5ed68d29a140e14c8d46980fa844548eb33b1e87 |
|
26-May-2010 |
Mike Lockwood <lockwood@android.com> |
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>
/frameworks/av/media/mtp/MtpDevice.cpp
|