summaryrefslogtreecommitdiffstats
path: root/media/mtp
Commit message (Collapse)AuthorAgeFilesLines
* Clean up time zone handling in MtpUtils::parseDateTime.Elliott Hughes2016-01-081-19/+19
| | | | | | | | | | | | | | | | | The intent here is supposed to be to use local time (which mktime(3) does) unless the string ends 'Z' in which case we're supposed to use UTC. The UTC equivalent of mktime(3) is timegm(3). This code has come to my attention in two ways. Externally it was pointed out that the localtime_r(3) was accessing uninitialized memory leading to unpredicatable results. Internally, this is the only caller of the non-standard mktime_tz --- ironically using it in a way that -- apart from the flakiness caused by the uninitialized variable -- would make it behave like the standard mktime(3). Bug: https://code.google.com/p/android/issues/detail?id=185159 Bug: http://b/15765976 Change-Id: I5f015727c4c08a139ef478fafba5811a9758d5df
* Screenshots info is not updated when device is plugged in MTP modeMaunik Shah2015-10-312-0/+7
| | | | | | | | | | When device is connected as MTP mode and user opens folder /sdcard/Pictures/Screenshots/ in windows system and captures new screenshot, image information is always shown as 0 KB Issue: https://code.google.com/p/android/issues/detail?id=56204 Change-Id: I86d8e1ee54c0d8b2008b5f6bc0de2cac3faafc20
* am 1f7101ee: am 64c496c8: Merge "Fix MTP delete" into lmp-mr1-devMarco Nelissen2015-01-231-2/+2
|\ | | | | | | | | * commit '1f7101ee7096dc11cd212935d84c0f9a3376b061': Fix MTP delete
| * Fix MTP deleteMarco Nelissen2015-01-231-2/+2
| | | | | | | | | | Bug: 18836972 Change-Id: Ia1caa9bfb0f2084af774745b5c01b260ab1f1b20
* | am 562b98ec: am e48cf5b8: Fix bounds checking for GetPartialObject commandMike Lockwood2014-12-171-2/+8
|\ \ | |/ | | | | | | * commit '562b98ec7edf9303f4c7d8da7e81171b621d3849': Fix bounds checking for GetPartialObject command
| * Fix bounds checking for GetPartialObject commandMike Lockwood2014-12-171-2/+8
| | | | | | | | | | | | | | GetPartialObject has only 3 arguments, whereas the 64 bit version takes 4. Bug: 18786282 Change-Id: I4376962769ed0eae2f4991c2569244db22509204
* | am e418cfae: am 869e0798: Merge "MTP: add strict bounds checking for all ↵Mike Lockwood2014-11-1319-189/+386
|\ \ | |/ | | | | | | | | | | 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-1219-189/+386
| | | | | | | | | | | | | | | | | | | | | | 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
* | am 686a0c4d: Merge "MTP Device: Parse USB3 descriptor for MTP initor;"Mike Lockwood2014-10-291-0/+9
|\ \ | |/ |/| | | | | * commit '686a0c4db5e90b811b1fbe1dba3638522ef4b7a1': MTP Device: Parse USB3 descriptor for MTP initor;
| * 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>
| * Remove last user of <cutils/tztime.h>.Elliott Hughes2014-07-242-4/+2
| | | | | | | | | | Bug: 15765976 Change-Id: Ib21abe9349bb1863304cd7618d8fc95ca254e8f6
* | Remove last user of <cutils/tztime.h>.Elliott Hughes2014-07-242-4/+2
| | | | | | | | | | | | | | | | Bug: 15765976 (cherry picked from commit 56687f7cbf0a3d7909830fc1390a98c713a05e6f) Change-Id: Iacb225584c3acdbb512f46b638a215b75b32cdcb
* | mtp: 64-bit compile warningsMark Salyzyn2014-06-252-5/+8
| | | | | | | | Change-Id: I9ebc270c990d2f83311cec8fef8f1d2842ebf291
* | Improve MTP error checkingMarco Nelissen2014-06-241-23/+42
| | | | | | | | Change-Id: I1ab02ca0e99a1c284411fb368a773fb481d72ab2
* | am 620f348f: am da69fdbb: Merge "Fix buffer allocation"Marco Nelissen2014-06-231-1/+1
|\ \ | |/ | | | | | | * commit '620f348faf3ce0c39e71338a005f1528765f4d1e': Fix buffer allocation
| * Fix buffer allocationMarco Nelissen2014-06-231-1/+1
| | | | | | | | | | | | b/15293123 Change-Id: Icb3ceabf02a55bc931baaf388ce125db6332de0e
* | am e80631aa: am 839d11d1: Merge changes I0a744dc7,Id993a70dMark Salyzyn2014-04-152-5/+6
|\ \ | |/ | | | | | | | | * commit 'e80631aa1992ca50af679cd6a018c0ffda7f9b17': media: use size_t for integer iterator to Vector::size() media: 64 bit compile issues
| * media: use size_t for integer iterator to Vector::size()Mark Salyzyn2014-04-152-4/+4
| | | | | | | | Change-Id: I0a744dc7815a86a993df9b0623440be620ec8903
| * media: 64 bit compile issuesMark Salyzyn2014-04-152-5/+6
| | | | | | | | | | | | | | | | - change internal sized types to use stdint.h - printf & scanf formats - size_t or unsigned int for iterators Change-Id: Id993a70d8bf54c667c5d652b34179a2c727ed446
* | mtp: avoid silent allocation overflow in MtpPropertyLajos Molnar2014-03-241-1/+8
| | | | | | | | | | Bug: 13006907 Change-Id: Ice0352394840132c9c2ce6c28366632c792a32c0
* | MTP: Add support for device property changed eventsMike Lockwood2014-03-113-2/+9
|/ | | | | | | Also fixed bug in MtpProperty::write() for device properties Bug: 7342482 Change-Id: If0099095d101409d131564e55b1939895c69c202
* Make frameworks/av 64-bit compatibleKévin PETIT2014-02-111-2/+3
| | | | | | | | | | | | Contains the necessary changes to make frameworks/av build and work on a 64-bit machine. Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
* Long mp3 metadata displays as corrupted file after transferYin Liu2013-12-203-18/+26
| | | | | | | Cut the metadata to 1 Byte and return in function getObjectPropertyList in order to show it properly on a PC. Change-Id: Iefacf9fa86c20ece2572e6d95d35877a94066fe7
* Add liblogYing Wang2013-04-091-1/+1
| | | | | Bug: 8580410 Change-Id: If493d87d60d71be664ad75b140c62acadb75b0d0
* MTP: Implement date created field in GetObjectInfoMike Lockwood2013-04-011-1/+2
| | | | | Bug: 8293874 Change-Id: I6b74fe73362bd4fac34ca8a54e127ae91f82aef9
* MTP: Write initial data to correct file offset in SendPartialObjectMike Lockwoood2013-02-081-1/+1
| | | | Change-Id: I84288aeda3e65e6e6487f11d32a72910cd16cff2
* am ed757e97: am 290ac693: Merge "Stop building the unused host libmtp static ↵Elliott Hughes2012-09-111-28/+0
|\ | | | | | | | | | | | | library." * commit 'ed757e9729b325f00e70f506ad6e217910563d0a': Stop building the unused host libmtp static library.
| * Stop building the unused host libmtp static library.Elliott Hughes2012-09-111-28/+0
| | | | | | | | | | | | | | | | This removes the need to support the bionic mktime_tz and localtime_tz extensions on glibc, which makes my life easier. Bug: 7012465 Change-Id: Ibfa187f2857dda7bd1536348e314a80abacb9d1e
* | Add mode when open(O_CREAT) is used.Nick Kralevich2012-06-262-2/+2
|/ | | | | | | | | | 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
* Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/James Dong2012-06-132-0/+190
| | | | | Change-Id: I0a3af3e2abdedebd5934f3d941d01c32cfc75e26 related-to-bug: 6647465
* media/mtp: Add missing LOCAL_C_INCLUDESDavid 'Digit' Turner2012-01-131-0/+3
| | | | | | | | | | | One of the source files here is including <cutils/tztime.h> which itself includes <bionic_time.h>, a private C library header used to define the strftime_tz() extension (which used to be declared in <time.h> but was moved there instead). Add a missing C include path to let our code compile as usual. Change-Id: I6aac2f1d3d15ad182679c81ff3f4febff74eb671
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-085-39/+39
| | | | | | | 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-042-13/+13
| | | | | | | 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-034-17/+17
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* MTP: Add support for restricting PTP to only certain subdirectories of the ↵Mike Lockwood2011-12-021-4/+7
| | | | | | | | | storage Bug: 5527220 Change-Id: If68e7481617ecb62abd24e2d89e6b7dfdf95ba2b Signed-off-by: Mike Lockwood <lockwood@google.com>
* MTP: Don't attempt to read more than 16K at a time from the MTP driverMike Lockwood2011-12-011-2/+4
| | | | | | | | This could happen sometimes if other operations increased the size of the data packet buffer to > 16K Change-Id: I4d316c7e2e558d3dd861d39accae6514fd9a62f5 Signed-off-by: Mike Lockwood <lockwood@google.com>
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-265-39/+39
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* MtpServer: Pass 0xFFFFFFFF for file size when receiving files >= 4GB in sizeMike Lockwood2011-10-131-1/+6
| | | | | | | Bug: 5432487 Change-Id: Ie86e72d9d85476941eab6a9d271948b8fdde6926 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Use a single packet for the data phaseMike Lockwood2011-07-173-80/+66
| | | | | | | | instead of sending 12 byte header in a separate packet. PTP on the Mac is much happier with this approach. Change-Id: I7d1ca498f6346afd88876d24332187b466fc469c Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Clean up MtpServer initialization and threading:Mike Lockwood2011-07-131-0/+2
| | | | | | | Move thread from native to Java code Remove the stop() method (the thread will exit on its own) Change-Id: Ib897c3630162f82669a4ee8c187e8172da50b29d
* Remove the simulator target from all makefiles.Jeff Brown2011-07-111-4/+0
| | | | | | Bug: 5010576 Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
* MTP: Return error if user tries to copy a file >= 4GB to a FAT32 file systemMike Lockwood2011-07-113-2/+14
| | | | | | | Bug: 4561836 Change-Id: I2bffb93b032038f6c220c24c752ccd7ca66c23a0 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add support for PTP variant of GetDeviceInfo result.Mike Lockwood2011-06-212-4/+19
| | | | | Change-Id: I09f86fda768b7697665e401adb9516588859bf59 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Fix some problems with GetObjectHandles and GetNumObjects commandsMike Lockwood2011-06-171-6/+2
| | | | | | | | These calls did not correctly handle some variants of the arguments, which showed up when running in PTP mode. Change-Id: Iedbaefebfa39111c8bcaee7c6cc3820a65d6c98f Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Have GetStorageInfo command return correct storage type for removable ↵Mike Lockwood2011-05-162-4/+8
| | | | | | | storage Change-Id: I09b548483c12080e7d77970babcae2eef379f2f4 Signed-off-by: Mike Lockwood <lockwood@android.com>
* DO NOT MERGE MTP: Implement GetThumb commandMike Lockwood2011-05-035-1/+34
| | | | | | | | | This allows the PC to access thumbnails in JPEG files over MTP/PTP Bug: 3219495 Change-Id: Id61f353ba70e896fae9a47338bf7871c0f185d3e Signed-off-by: Mike Lockwood <lockwood@android.com>
* DO NOT MERGE MTP: Fix file descriptor leak in file editing extensionsMike Lockwood2011-05-032-24/+29
| | | | | Change-Id: Ie0b979b5cfd9b5f9e9196c5f8c8ecccef6ed84c3 Signed-off-by: Mike Lockwood <lockwood@android.com>
* DO NOT MERGE MTP: Add extended operations to support in-place editing of filesMike Lockwood2011-05-035-8/+268
| | | | | | | | | | | | | | | | | | | | | | MTP does not support partial writes of files (the entire file must be transferred at once). This makes it impossible to implement a FUSE file system for MTP with acceptable performance. To fix this problem, this change adds extended MTP operations to allow partial writes to files: SendPartialObject - allows writing a subset of a file, or appending to the end of a file TruncateObject - allows changing the size of a file BeginEditObject - must be called before using SendPartialObject and TruncateObject EndEditObject - commits changes to a file after it has been edited with SendPartialObject or TruncateObject We also add GetPartialObject64, which is the same as GetPartialObject but has a 64 bit offset rather than 32. Change-Id: Id5365e1c4dc55a2d819c16c9db0a3ac2260f9309 Signed-off-by: Mike Lockwood <lockwood@android.com>
* DO NOT MERGE MTP and media provider support for multiple storage devices:Mike Lockwood2011-05-034-8/+9
| | | | | | | | | | | | | | - MTP support for multiple storage units - Add storage_id column to media database for MTP storage ID - Add framework resource for defining mount points and user visible descriptions for multiple volumes - Clean up locking in MtpServer JNI code Change-Id: Ide6d47bd9aa1698ed2a13d695613e03f2a9b29e3 Signed-off-by: Mike Lockwood <lockwood@android.com>
* 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>