• Home
  • History
  • Annotate
  • only in /frameworks/av/media/mtp/
History log of /frameworks/av/media/mtp/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d35c21207762c33c6f8f517e52533d6738d9adf0 23-Jan-2015 Marco Nelissen <marcone@google.com> am 1f7101ee: am 64c496c8: Merge "Fix MTP delete" into lmp-mr1-dev

* commit '1f7101ee7096dc11cd212935d84c0f9a3376b061':
Fix MTP delete
ea9f215a13f1a5e6455be91624a81a024641a26d 23-Jan-2015 Marco Nelissen <marcone@google.com> Fix MTP delete

Bug: 18836972
Change-Id: Ia1caa9bfb0f2084af774745b5c01b260ab1f1b20
tpServer.cpp
93830b75204207addee67705016aab1a34eee5f6 18-Dec-2014 Mike Lockwood <lockwood@google.com> am 562b98ec: am e48cf5b8: Fix bounds checking for GetPartialObject command

* commit '562b98ec7edf9303f4c7d8da7e81171b621d3849':
Fix bounds checking for GetPartialObject command
e48cf5b8f823c30af93577c1e380d752ac69b871 17-Dec-2014 Mike Lockwood <lockwood@google.com> Fix bounds checking for GetPartialObject command

GetPartialObject has only 3 arguments, whereas the 64 bit version takes 4.

Bug: 18786282
Change-Id: I4376962769ed0eae2f4991c2569244db22509204
tpServer.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
tpDataPacket.cpp
tpDataPacket.h
tpDevice.cpp
tpDevice.h
tpDeviceInfo.cpp
tpDeviceInfo.h
tpObjectInfo.cpp
tpObjectInfo.h
tpPacket.cpp
tpPacket.h
tpProperty.cpp
tpProperty.h
tpRequestPacket.cpp
tpRequestPacket.h
tpServer.cpp
tpStorageInfo.cpp
tpStorageInfo.h
tpStringBuffer.cpp
tpStringBuffer.h
841daebc75fbf5e7fb4dd71cab559b8f4d7150ae 29-Oct-2014 Mike Lockwood <lockwood@google.com> am 686a0c4d: Merge "MTP Device: Parse USB3 descriptor for MTP initor;"

* commit '686a0c4db5e90b811b1fbe1dba3638522ef4b7a1':
MTP Device: Parse USB3 descriptor for MTP initor;
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>
tpDevice.cpp
37b216c75ca5e38f1a56a86a95b04ff6b4e71ae7 25-Jul-2014 Elliott Hughes <enh@google.com> Remove last user of <cutils/tztime.h>.

Bug: 15765976

(cherry picked from commit 56687f7cbf0a3d7909830fc1390a98c713a05e6f)

Change-Id: Iacb225584c3acdbb512f46b638a215b75b32cdcb
ndroid.mk
tpUtils.cpp
56687f7cbf0a3d7909830fc1390a98c713a05e6f 25-Jul-2014 Elliott Hughes <enh@google.com> Remove last user of <cutils/tztime.h>.

Bug: 15765976
Change-Id: Ib21abe9349bb1863304cd7618d8fc95ca254e8f6
ndroid.mk
tpUtils.cpp
d239cb6e6898bdf2300e9038111727a9056c58ee 19-Jun-2014 Mark Salyzyn <salyzyn@google.com> mtp: 64-bit compile warnings

Change-Id: I9ebc270c990d2f83311cec8fef8f1d2842ebf291
tpServer.cpp
tpStorageInfo.cpp
dcd89ecad321e2e052322fe2b1907d50d762b311 24-Jun-2014 Marco Nelissen <marcone@google.com> Improve MTP error checking

Change-Id: I1ab02ca0e99a1c284411fb368a773fb481d72ab2
tpServer.cpp
c27f5259cf2c45ea6f0a021fc17578f32f6c2f7d 23-Jun-2014 Marco Nelissen <marcone@google.com> am 620f348f: am da69fdbb: Merge "Fix buffer allocation"

* commit '620f348faf3ce0c39e71338a005f1528765f4d1e':
Fix buffer allocation
ebb1081a624a773a67c49b279c775e18e693c4fc 23-Jun-2014 Marco Nelissen <marcone@google.com> Fix buffer allocation

b/15293123

Change-Id: Icb3ceabf02a55bc931baaf388ce125db6332de0e
tpDataPacket.cpp
1b24cf32e02a1372e57b3a2a432bc0adfe496e6d 16-Apr-2014 Mark Salyzyn <salyzyn@google.com> am e80631aa: am 839d11d1: Merge changes I0a744dc7,Id993a70d

* commit 'e80631aa1992ca50af679cd6a018c0ffda7f9b17':
media: use size_t for integer iterator to Vector::size()
media: 64 bit compile issues
3ab368e0810d894dcbc0971350c095049478a055 15-Apr-2014 Mark Salyzyn <salyzyn@google.com> media: use size_t for integer iterator to Vector::size()

Change-Id: I0a744dc7815a86a993df9b0623440be620ec8903
tpDevice.cpp
tpServer.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
tpDevice.cpp
tpServer.cpp
eb5d7f2f1cc049ea7f95a4f089ce2113d7683dda 25-Mar-2014 Lajos Molnar <lajos@google.com> mtp: avoid silent allocation overflow in MtpProperty

Bug: 13006907
Change-Id: Ice0352394840132c9c2ce6c28366632c792a32c0
tpProperty.cpp
0fa848d780cf990a2860637f40432d28594c85a3 07-Mar-2014 Mike Lockwood <lockwood@google.com> MTP: Add support for device property changed events

Also fixed bug in MtpProperty::write() for device properties

Bug: 7342482
Change-Id: If0099095d101409d131564e55b1939895c69c202
tpProperty.cpp
tpServer.cpp
tpServer.h
377b2ec9a2885f9b6405b07ba900a9e3f4349c38 03-Feb-2014 Kévin PETIT <kevin.petit@arm.com> Make frameworks/av 64-bit compatible

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
tpProperty.cpp
014897f5aece2c6212418934bd4618326979f17a 04-Dec-2012 Yin Liu <yin2.liu@sonymobile.com> Long mp3 metadata displays as corrupted file after transfer

Cut the metadata to 1 Byte and return in function
getObjectPropertyList in order to show it properly on a PC.

Change-Id: Iefacf9fa86c20ece2572e6d95d35877a94066fe7
tpDataPacket.cpp
tpStringBuffer.cpp
tpStringBuffer.h
ecba7488c5cceaacef95836b1b476433451e7761 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: If493d87d60d71be664ad75b140c62acadb75b0d0
ndroid.mk
cba6b7dbe6e6d89c00021a0954d8bf60eacefdfa 01-Apr-2013 Mike Lockwood <lockwood@google.com> MTP: Implement date created field in GetObjectInfo

Bug: 8293874
Change-Id: I6b74fe73362bd4fac34ca8a54e127ae91f82aef9
tpServer.cpp
38fb629c46efb74517332696d5d117f4466fa3f0 08-Feb-2013 Mike Lockwoood <lockwood@google.com> MTP: Write initial data to correct file offset in SendPartialObject

Change-Id: I84288aeda3e65e6e6487f11d32a72910cd16cff2
tpServer.cpp
60d6452fe7d04d5723c2d343e61d819832361a1c 11-Sep-2012 Elliott Hughes <enh@google.com> am ed757e97: am 290ac693: Merge "Stop building the unused host libmtp static library."

* commit 'ed757e9729b325f00e70f506ad6e217910563d0a':
Stop building the unused host libmtp static library.
e0e2e98674caa7f6285eda122ebabee40528374b 11-Sep-2012 Elliott Hughes <enh@google.com> Stop building the unused host libmtp static library.

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
ndroid.mk
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
tpDevice.cpp
tpServer.cpp
3d51d5cb53cc630709a0ba78d0e60501a675f2d5 13-Jun-2012 James Dong <jdong@google.com> Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/

Change-Id: I0a3af3e2abdedebd5934f3d941d01c32cfc75e26
related-to-bug: 6647465
ODULE_LICENSE_APACHE2
OTICE
c7a8e2422445030b9312470abca23c966b6367c7 13-Jan-2012 David 'Digit' Turner <digit@google.com> media/mtp: Add missing LOCAL_C_INCLUDES

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
ndroid.mk
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
tpDataPacket.cpp
tpDevice.cpp
tpPacket.cpp
tpProperty.cpp
tpServer.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
tpDevice.cpp
tpProperty.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
tpDevice.cpp
tpObjectInfo.cpp
tpServer.cpp
tpStorageInfo.cpp
a9a46c1f53129be8fe1f3f0a6ea868d7b4c8f8f7 01-Dec-2011 Mike Lockwood <lockwood@google.com> MTP: Add support for restricting PTP to only certain subdirectories of the storage

Bug: 5527220

Change-Id: If68e7481617ecb62abd24e2d89e6b7dfdf95ba2b
Signed-off-by: Mike Lockwood <lockwood@google.com>
tpServer.cpp
44c190826d72589f5c9e13d69e32673bd8bd7c64 02-Dec-2011 Mike Lockwood <lockwood@google.com> MTP: Don't attempt to read more than 16K at a time from the MTP driver

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>
tpDataPacket.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
tpDevice.cpp
tpDeviceInfo.cpp
tpPacket.cpp
tpServer.cpp
tpStorage.cpp
0cc79c66329b9ffa7d7bdfafa5d245a11fd3660d 13-Oct-2011 Mike Lockwood <lockwood@android.com> MtpServer: Pass 0xFFFFFFFF for file size when receiving files >= 4GB in size

Bug: 5432487

Change-Id: Ie86e72d9d85476941eab6a9d271948b8fdde6926
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
ef441d965504dbf31c5db690e5b34fcdcecd92ff 15-Jul-2011 Mike Lockwood <lockwood@android.com> MTP: Use a single packet for the data phase

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>
tpDataPacket.cpp
tpDataPacket.h
tpServer.cpp
dec7388c3edf09eaaccaaf57f6301e716319a34d 11-Jul-2011 Mike Lockwood <lockwood@android.com> MTP: Clean up MtpServer initialization and threading:

Move thread from native to Java code
Remove the stop() method (the thread will exit on its own)

Change-Id: Ib897c3630162f82669a4ee8c187e8172da50b29d
tpServer.cpp
5e0067b486c3862316aa1f293cf9690c0cf54bda 12-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
ndroid.mk
9b88b72ee2c3fd01fb46e77b7e6d80f3bd52e958 11-Jul-2011 Mike Lockwood <lockwood@android.com> MTP: Return error if user tries to copy a file >= 4GB to a FAT32 file system

Bug: 4561836

Change-Id: I2bffb93b032038f6c220c24c752ccd7ca66c23a0
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
tpStorage.cpp
tpStorage.h
3d1d7767afc7c488197ec40a22739159c5110721 21-Jun-2011 Mike Lockwood <lockwood@android.com> MTP: Add support for PTP variant of GetDeviceInfo result.

Change-Id: I09f86fda768b7697665e401adb9516588859bf59
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
tpServer.h
dc3185e3e27b05e18c4ac34432a25a0c279ff351 17-Jun-2011 Mike Lockwood <lockwood@android.com> MTP: Fix some problems with GetObjectHandles and GetNumObjects commands

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>
tpServer.cpp
7efab4282a7179b2f53a3dbccee3e70d7fce6a7f 10-May-2011 Mike Lockwood <lockwood@android.com> MTP: Have GetStorageInfo command return correct storage type for removable storage

Change-Id: I09b548483c12080e7d77970babcae2eef379f2f4
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpStorage.cpp
tpStorage.h
aeb65d45a93878bba361956b3f3280b36cc48e59 25-Apr-2011 Mike Lockwood <lockwood@android.com> DO NOT MERGE MTP: Implement GetThumb command

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>
tpDataPacket.cpp
tpDataPacket.h
tpDatabase.h
tpServer.cpp
tpServer.h
c9ee8c2dd7d0860b41a3312bbf7ff390f5d0cf8e 25-Apr-2011 Mike Lockwood <lockwood@android.com> DO NOT MERGE MTP: Fix file descriptor leak in file editing extensions

Change-Id: Ie0b979b5cfd9b5f9e9196c5f8c8ecccef6ed84c3
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
tpServer.h
4d9da14065fea7bca759f83c419ce10bd1195e83 22-Apr-2011 Mike Lockwood <lockwood@android.com> DO NOT MERGE MTP: Add extended operations to support in-place editing of files

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>
tpDatabase.h
tpDebug.cpp
tpServer.cpp
tpServer.h
tp.h
0241cacb85dbac20b28036bbb8025dfd513e3753 05-Apr-2011 Mike Lockwood <lockwood@android.com> DO NOT MERGE MTP and media provider support for multiple storage devices:

- 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>
tpServer.h
tpStorage.cpp
tpStorage.h
tp.h
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>
tpDevice.cpp
33bde8d8c4fc71fb3cdd8356fd0df70ffb44fcd7 12-Mar-2011 Mike Lockwood <lockwood@android.com> MTP host: Fix problems reading large data packets

Fixes problem reading large thumbnails via PTP

Bug: 4065217

Change-Id: I643672512829c93ab0827091f39103dbb1918071
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDataPacket.cpp
a849440ca96e93f700d62c6e41d48905b4d405b6 18-Feb-2011 Mike Lockwood <lockwood@android.com> MTP: Add support for dynamically adding and removing storage units

BUG: 3402847

Change-Id: I7da266061d949abcb6bb11c6faaa47b5e4a2a977
tpServer.cpp
tpServer.h
tpStorage.cpp
tpStorage.h
tp.h
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>
tpDevice.cpp
126ea73dd1919c8a176019c50b1ca96035aef45b 14-Feb-2011 Mike Lockwood <lockwood@android.com> MTP host: Use usb_device_bulk_transfer for synchronous transfers

Change-Id: Icf42ea0e5a848cee1565da49713ee9ad0db9f1a6
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpPacket.cpp
31c52e7c8c01e1db6ff9bcf66135c72544b1235a 02-Feb-2011 Kenny Root <kroot@google.com> Fix some memory leaks found in static analysis

Change-Id: Icd630009793c51acfaed45763ef50489ead40024
tpDevice.cpp
8d08c5aeee05425357b6603a22fa73fd6e095a47 31-Jan-2011 Mike Lockwood <lockwood@android.com> MTP: Use ro.product.manufacturer system property value for MTP manufacturer name

Previously it was hard coded to "Google, Inc."

BUG: 3405965

Change-Id: I5f962d474814c22e990c39b501c0f01da9e8dc6d
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.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>
tpDevice.cpp
d7376cae7aba269dca143b94c3d6736d0ed02213 27-Jan-2011 Mike Lockwood <lockwood@android.com> am bd65c065: am a13732e1: Merge "MTP: Fix month off by one error in date parsing and formatting code" into honeycomb

* commit 'bd65c065b2dcb54dde563a8a21c9f92da947c7dd':
MTP: Fix month off by one error in date parsing and formatting code
ea1db0a716cc937af5371153b959610baa2c6d52 26-Jan-2011 Mike Lockwood <lockwood@android.com> MTP: Fix month off by one error in date parsing and formatting code

BUG: 3379100

Change-Id: Ib386f0def9d611529ce0528b8159cef48df9cd85
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpUtils.cpp
7aa9f73b06525781245b8c2970f09f48050a276d 23-Jan-2011 Mike Lockwood <lockwood@android.com> Merge "New APIs for MTP and PTP host support"
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>
ndroid.mk
tpClient.cpp
tpClient.h
tpDevice.cpp
tpDevice.h
59d6ae5e339547fea8a350c1d855b52d5ac4f62c 22-Jan-2011 Mike Lockwood <lockwood@android.com> Remove MTP related log spam

Change-Id: I9de1792cbeec07fa5ab42ff9a10813f0c3d30fc1
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
tpStorage.cpp
aa95240d9096f97aa2e2022fae8764a4386c8951 18-Jan-2011 Mike Lockwood <lockwood@android.com> MTP: Fix problems with modification dates for folders and non-media files

Also removed an unnecessary parameter to MtpDatabase.endSendobject()

BUG: 3352142

Change-Id: I6fd812dcba4814956bc8bc1cbd6bd5c868197790
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDatabase.h
tpServer.cpp
5de2001a5c3f854b63dbcea284e02f930881ca75 06-Jan-2011 Mike Lockwood <lockwood@android.com> Remove support for obsolete PTP content provider

This will be replaced by a new PTP host API in an upcoming commit.

Change-Id: Ib914194e332b5c090cb8e34ed35bd691bc9f85d1
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
tpCursor.cpp
tpCursor.h
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>
tpClient.cpp
tpDataPacket.cpp
tpDataPacket.h
tpDevice.cpp
tpDevice.h
tpEventPacket.cpp
tpEventPacket.h
tpPacket.cpp
tpPacket.h
tpRequestPacket.cpp
tpRequestPacket.h
tpResponsePacket.cpp
tpResponsePacket.h
d1b056a099b29e81d65582a8612210967fb71f93 29-Dec-2010 Mike Lockwood <lockwood@android.com> Change libusbhost and libmtp from static to shared libraries

Change-Id: Iccc67db32400cdeb88aa33261c9e0cf73db992ca
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
feafefb1ed8d86100161f521fc7a44b819bd9529 14-Dec-2010 Mike Lockwood <lockwood@android.com> MTP: check for replacing existing files via the database instead of the file system

Change-Id: I283dab48f24d2836e48fab8e49764a9cdf13de55
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
20c3be0e0394e1340c036685eb1edb8f6ef5a2ac 12-Dec-2010 Mike Lockwood <lockwood@android.com> MTP: Add support for reserve storage setting to avoid low storage situations.

Set resource config_mtpReserveSpaceMegabytes to number of megabytes to reserve.
If MTP has dedicated storage this value should be zero, but if MTP is
sharing storage with the rest of the system, set this to a positive value
to ensure that MTP activity does not result in the storage being
too close to full.

BUG: 3250924

Change-Id: I881c87240da268bad1ea1b99ad03673ab85ffdbf
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
tpServer.h
tpStorage.cpp
tpStorage.h
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>
tpDevice.cpp
tpDevice.h
tpPacket.cpp
tpPacket.h
fd34626771a63d3a835863e1b4bf71dcb26e28d8 09-Dec-2010 Mike Lockwood <lockwood@android.com> MTP: Improve argument checking in SendObjectInfo

In particular, make sure the parent is a folder and make sure file
does not already exist.

Change-Id: Ifa870faba3285f03a92025d9e82f93fed78a761c
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDatabase.h
tpProperty.cpp
tpServer.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>
tpDevice.cpp
tpDevice.h
5da864845e024833c4c7f641acd7c88187a6bc1e 07-Dec-2010 Mike Lockwood <lockwood@android.com> MTP: Read property code before calling isDeviceProperty in MtpProperty::read()

Change-Id: I0b1493f3af5d9caac08327f9ffba91ee255d3d55
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpProperty.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>
tpDevice.cpp
tpDevice.h
tpProperty.cpp
tpProperty.h
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>
tpDevice.cpp
tpDevice.h
2e09e289b7e136481e9215bb61ed47cee5d9919b 07-Dec-2010 Mike Lockwood <lockwood@android.com> MTP: Use correct return type for getSupportedObjectProperties

Change-Id: I6d5bd63fecaa3384dfa1b97dbc0d89ea5668981f
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
ddc4497c17b23d4a9828f977d5ac11ee36059da9 07-Dec-2010 Mike Lockwood <lockwood@android.com> Revert "MTP: Remove static library build for linux host."

This reverts commit d46c683f0e13ad9341ba83453835f6658ae5ad15.

Change-Id: I7e56760c92bad1d66d4a1f2415328a4d2138de84
ndroid.mk
40ce1f262cc4edbc8b7c470830325466263acaec 02-Dec-2010 Mike Lockwood <lockwood@android.com> MTP: Add support for multiple properties in GetObjectPropList command

Change-Id: Ib469a6c8141937aaa3e811345056195117abb4b2
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDatabase.h
tpProperty.cpp
tpServer.cpp
1d34b4b921cdac91116e456d97b57a1931e9e335 30-Nov-2010 Mike Lockwood <lockwood@android.com> MTP: Make sure buffer is big enough before reading the data packet

Fixes buffer overflow when transferring large playlists.

Change-Id: I1b7feaf9e56d849e5b6609f0f68a6aa5a3ae1ea8
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDataPacket.cpp
f05ff073495b0bb3e49859aee5b54d3e25088985 24-Nov-2010 Mike Lockwood <lockwood@android.com> MTP: Fix typo in MtpServer::doGetObjectPropList

Change-Id: Ia5fec45a238c49a6797a4ac55457ddb5d6521408
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
d81ce3cf2e6479915658a0829eced062e3655320 23-Nov-2010 Mike Lockwood <lockwood@android.com> MTP: Implement GetPartialObject command

Allows host to read partial contents of files on the device

Change-Id: I74927f7394224d674e1d150a4b72a51d9358459b
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpPacket.cpp
tpServer.cpp
tpServer.h
b892d0e5556ed6ded3e0548f75ab16fc2e3d92c3 24-Nov-2010 Mike Lockwood <lockwood@android.com> MTP: Use DateTime form in GetObjectPropDesc for date/time properties.

Change-Id: I5a3c0b07a9f2958b86947256606e6a824dbe93a6
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpProperty.cpp
tpProperty.h
57151f37d7c91e031e91f67a83ee49cad33b4867 22-Nov-2010 Mike Lockwood <lockwood@android.com> Rename MtpCursor to PtpCursor

Change-Id: I8ce257641388b195f3e17995d323355b19355dc1
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
tpCursor.cpp
tpCursor.h
tpCursor.cpp
tpCursor.h
8e4d78541aafe9df78db510b3c804222cceb1e40 20-Nov-2010 Mike Lockwood <lockwood@android.com> MTP: Remove static library build for linux host.

Change-Id: Iefdd386b91dba0579ca952aca40b7114535e1d4e
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
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>
tpDevice.cpp
tpDevice.h
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>
tpDataPacket.cpp
tpDataPacket.h
tpDevice.cpp
tpDevice.h
e1b8cf1cafb75ce1339b67eb1764e224a257c579 16-Nov-2010 Mike Lockwood <lockwood@android.com> MTP: Fixes to allow file transfers > 4 gigabytes

BUG: 3198248

Change-Id: I6f11c79a19d7bdd63718a7370939124b1262d221
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDatabase.h
tpServer.cpp
f5b2ff2a636d1a98e959553376ebffa3a2749843 17-Nov-2010 Mike Lockwood <lockwood@android.com> MTP: Set correct format for abstract audio playlists

Fixes a bad interaction with the media scanner that could result in
playlists getting duplicated or deleted after rebooting.

BUG: 3175649

Change-Id: I970234e86b24ac17d069aca085683d988abc7881
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
b6da06e9dfb916da4b88e09e8a83e22ddae445b5 15-Oct-2010 Mike Lockwood <lockwood@google.com> MTP: Partial implementation of the GetObjectPropList command

In this initial implementation we only support fetching one property at a time.
Support depth = 0 (single object) or depth = 1 (all objects in a directory)
Reimplemented GetObjectPropValue on top of GetObjectPropList, since the former
is a special case of the latter.

Change-Id: Ia76ee61741d6ee3902b5c5d9fc094cf86dfaf650
Signed-off-by: Mike Lockwood <lockwood@google.com>
tpDatabase.h
tpDebug.cpp
tpProperty.cpp
tpServer.cpp
tpServer.h
tp.h
7ce05cf6009a2fbbceb3d2c0ff639473d0b7d6a9 11-Nov-2010 Mike Lockwood <lockwood@android.com> MTP: Add missing call to closedir() in recursive delete code

BUG: 3185660

Change-Id: I3744d2cb193829d20a689af2aea50e8516779631
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
d472e2804190ea6261a88dae546e5908309209f9 10-Nov-2010 Mike Lockwood <lockwood@android.com> MTP: Don't dump data packets twice in debug output.

Change-Id: I49b383d39aea101a58ae6902952ba91b44e7dc3b
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDataPacket.cpp
tpDebug.cpp
0181726d0cc2d0fc6f6a53b6479dcf0fc41b9499 10-Nov-2010 Mike Lockwood <lockwood@android.com> Add support for range and enum forms in MTP ObjectPropDescs

Change-Id: I70809401e37a1cfb82f5dbf86947be7d9500ccf1
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpProperty.cpp
tpProperty.h
23d2071ab44d7b5e3b16e8a81e11884faf01092f 11-Oct-2010 Mike Lockwood <lockwood@google.com> MTP: Include size of 12 byte header in packet size for GetObject data packet

Fixes file transfer from device to host with libmtp.

Change-Id: Ifb304c1f106e94b2710ee5c11816b83cf5f25478
Signed-off-by: Mike Lockwood <lockwood@google.com>
tpServer.cpp
3a2f37f40cfceb181ee61ae53a7d6954ce9717cd 28-Sep-2010 Mike Lockwood <lockwood@android.com> MtpCursor: Fix long to int truncation bug

BUG: 2978335

Change-Id: I2491a2ce3b65afa272540090cabace52067b8534
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpCursor.cpp
tpCursor.h
be92346b66d396830b30f535bc4b8a545b8c0009 26-Sep-2010 Mike Lockwood <lockwood@android.com> MTP: Fix some warnings

Change-Id: I1302cacd1df885c770332cecaaea9f7c8ab97b88
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpObjectInfo.cpp
dde372033b4da75ebde7ea2afdec1c1b86ab5a42 26-Sep-2010 Mike Lockwood <lockwood@android.com> MTP: Include current property value in GetDevicePropDesc

Change-Id: I05125c79ad58b6f75734fcedcc8af9b689fa9ff3
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpProperty.cpp
tpProperty.h
tpStringBuffer.cpp
tpStringBuffer.h
tpTypes.h
7cee5d3c3673d9a325d8096eea0ba48258fc656c 25-Sep-2010 Mike Lockwood <lockwood@android.com> MTP: Fix reading and writing device property descriptors

Change-Id: I8d9653ceedfed688addd6c4194c097d7090c3468
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpProperty.cpp
677f5700c5ea35256079ef14e06b7382e438d860 24-Sep-2010 Mike Lockwood <lockwood@android.com> MTP: Reenable GetObjectPropValue and SetObjectPropValue

Windows no longer chokes now that we implement the minimum set of properties

BUG: 2869730

Change-Id: Ie8bd9107610b9b38f060ad8a2f05334a3b4aff9b
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
a881b44cc7e18bdfa03251bc65b7d0903a1b1efc 24-Sep-2010 Mike Lockwood <lockwood@android.com> MTP: Minor debug output cleanup

Change-Id: I1065179aa64f43c7d8067ccda249319a016840ab
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
4620df7b92a85074a2fcdca3fc6f3a3d432bffb8 23-Sep-2010 Mike Lockwood <lockwood@android.com> MTP: Fix problems with signed ints in MtpCursor.cpp

BUG: 2978335

Change-Id: Ie9f3dea3b88b00a555e1ca3232f196e83ee7a6da
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpCursor.cpp
tpCursor.h
32eaa26f6152913b015f855a930cd8f12bd21d4d 21-Sep-2010 Mike Lockwood <lockwood@android.com> MTP: Fix typo that resulted in the MTP provider returning thumb format for object format

BUG: 2994234

Change-Id: I99574043d3e0b310b9b7246f89b5b4a1e14fb5a6
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpCursor.cpp
d32114950770a6e9361e0869a41e5a03a7acab42 13-Sep-2010 Mike Lockwood <lockwood@android.com> MTP: Delete all files and subdirectories when deleting directories.

Children are now recursively deleted from the database and filesystem.

Change-Id: Ifd9b48cbc34b84b8f5073f2493dfe9735fae5492
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.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>
tpDevice.cpp
tpProperty.cpp
tpProperty.h
tpServer.cpp
6b3a9d15c8a2282c03f1df7d72a55b6800d4ecec 31-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Send an Intent after an MTP session that resulted in media database modifications

Change-Id: Ib2796e9155350c67769502935a73cf98d6ae9c08
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDatabase.h
tpServer.cpp
5959988b63ace3fba2fc78b135a4f5ef25dcf860 26-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Fix build break due to integer constant too large

Change-Id: Ia03ebe171d68bdfb04913abafc11dcb9c9071595
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDataPacket.cpp
8277cec96ffa55082962591bca1c55abbeec8c26 10-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: work in progress on expanded property support

GetObjectPropValue and SetObjectPropValue are disabled until I figure out
why Windows doesn't like what I have done.

Change-Id: I74e945ef3ea031f6d46f4ebaa8df815da0a5c3ed
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDataPacket.cpp
tpDataPacket.h
tpDatabase.h
tpServer.cpp
tpServer.h
de1e37aad04640ef76f3c017b65adca087c7be0f 18-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Compatibility fixes for transferring strings

Change-Id: Ic06d754ee68b0389439cdc34f73adff0f2b33afa
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDataPacket.cpp
tpDataPacket.h
tpStringBuffer.cpp
bf9b2052d207f8f2a23470f1c4dfe464f430f387 10-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Fix wrong delete operator from previous change.

Change-Id: I64e8fdc610495f21060727b6bed42d1584833405
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
782aef17c9921a3bf401a0432878df5031f2328b 10-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Push queries for supported formats and properties up to Java.

Change-Id: I4f117090340e3916afda3d194521a6092a672ddc
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDataPacket.cpp
tpDataPacket.h
tpDatabase.h
tpServer.cpp
tpTypes.h
d7943b4cd2fa597581d1e29325adccc62dbf2939 10-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: turn off verbose logging

Change-Id: Ifd449c4e8c4aec6e5623869e86f8cbedd303972c
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDebug.h
2bb8c0e7c4e4093f4161ff5e98cef51c87193859 09-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Fix reading and writing property descriptors

We were missing support for the group code, resulting in an off by 4 bytes problem.

Change-Id: I4a640c67b8d36e1bd658b6185178a71966d4b0b6
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpProperty.cpp
tpProperty.h
a1825afa98dcb8fe2e44750072eaa04f7638623f 09-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Add debug code for printing names of MTP format and property codes.

Change-Id: Ia95ff014cec8720d01091fa30764011089076fe8
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDebug.cpp
tpDebug.h
f83caa2ef9574652b5f43c637a7899a3cbf95aa1 09-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Fix some typos

Change-Id: Ib31708c3a925e3c0ab8eea6922ab09e02b740936
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
tp.h
438344fba74ddd6b931ac733fa48643f27b63de3 03-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Add support for syncing MTP playlists

MTP playlists now correspond to playlists in the media provider
(like those created by the Music app).

Change-Id: I085cb3cff003037ad62f0e297fb0cfd3047cb3a2
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDatabase.h
tpServer.cpp
tpServer.h
343af4ef512869695456a91519e73ed3c3d82101 02-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Implement GetNumObjects

Change-Id: Iccc3a445f9a1eab7bb76eddd567c6a3a8f155b2b
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDatabase.h
tpServer.cpp
tpServer.h
9c04c4cc038f924d9cb98798e1c07fe6017e85d0 02-Aug-2010 Mike Lockwood <lockwood@android.com> Clean up MtpDatabase API.

Return MTP response codes instead of booleans for success or failure.
Remove some unused code.

Change-Id: I82ce80a4d7779233264e3caf139ebd0cece12f5c
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDatabase.h
tpServer.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>
tpDevice.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>
tpCursor.cpp
tpDebug.h
tpDevice.cpp
tpDeviceInfo.cpp
tpProperty.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>
tpDataPacket.cpp
tpDataPacket.h
tpDevice.cpp
tpDevice.h
2b6c4a26499693ae3638e3df6d4255b13e34ee29 27-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: Don't request thumbnails for folder objects in MtpCursor

Change-Id: I75a0a834ab746bed0a35883539c8dbc104789157
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpCursor.cpp
tpCursor.h
80a82ea7eb05c0b807a3b0a76e1b7137ea059189 27-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: Add hard coded support to recognize a couple MTP music players for testing purposes.

Change-Id: I2d09d78e83d13cfb3edff02372a6fc34b1e4d8b1
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpClient.cpp
5d98aaf0027d803fcfd4a1f2c374dfd34fb2cbad 20-Jul-2010 Mike Lockwood <lockwood@android.com> Merge "MTP host fixes:"
437e945013318de54746422c8b44306e6d5319ca 20-Jul-2010 Mike Lockwood <lockwood@android.com> MTP host fixes:

Add support for detecting android MTP devices
Fix problem reading data packet with header sent separately from payload.

Change-Id: I07b34af6783ebe2e63a317796ba0c8223df86edf
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpClient.cpp
tpDataPacket.cpp
59208db843985cb0626a71029ea2a08050702a61 20-Jul-2010 Andy McFadden <fadden@android.com> Fix sim-eng build.

The LOCAL_PATH assignment was not available to the new host library
on simulator builds.

Change-Id: I7727f17ecc8f457f92bd6fa9ec13025dd8a56390
ndroid.mk
941f1132dd76a959f17aaefd1ac2c0c6cc27a444 20-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: Remove race condition in initial device enumeration for host mode.

Change-Id: Iee01aaae3f8cca4234daa289bef6631da4d6c2b6
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpClient.cpp
tpClient.h
5cdceca217319bf6a22caf1acadc38c8dc259316 20-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: Fix problems reading and writing arrays in property values.

Change-Id: Idd53b63fd32698a3ffc90f174d16ae597b4feb36
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDataPacket.h
tpPacket.h
tpProperty.cpp
be9a95ce176e94c54f08454dc19e500546578154 19-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: add Linux host library for MTP/PTP host support.

Change-Id: Ie2ce60b957ee428a8e8db46a70c5a0ade8445007
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
tpEventPacket.cpp
73ecd23cc2ebadb8e1fae1cc21ac559524c6b2bb 19-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: Only send events to host if we have an open session.

Change-Id: I7b2d0c88c2d2ae0490247703d0fb1b862154db92
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
53fbfed0c81ac82606f27e25bbc61b44dde927a1 15-Jul-2010 Mike Lockwood <lockwood@android.com> Exclude MTP implementation from simulator build

Change-Id: I93364c74c26ba6e2bf6b08f1bd82802b966c8dfb
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
8065e2056073808716db32136d7acfd50eeab924 15-Jul-2010 Mike Lockwood <lockwood@android.com> Remove our copy of the f_mtp.h kernel header, now that it is in bionic.

Change-Id: I2b5e72bf25b3525ace4b919c6e8b6bd6750f6dfa
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpEventPacket.cpp
tpServer.cpp
_mtp.h
873871f3e75831bcda6c3f75bb4d53355ca5c53a 13-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: Add support for sending events to the host when objects are added and removed

Change-Id: Ia1d5232b919c644c670ff9ca651eca92b3f9ad42
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
tpEventPacket.cpp
tpEventPacket.h
tpServer.cpp
tpServer.h
tpTypes.h
_mtp.h
4714b0766ecf48f09f39b4781a5c4deafc092d49 12-Jul-2010 Mike Lockwood <lockwood@android.com> Integrate host to device file transfer with the media provider.

MTP file transfers happen in two stages. The SendObjectInfo command sends
some information about the file and reserves an ObjectHandle for the new file.
The file transfer is then performed using the SendObject command.

To support this in the media provider, MtpDatabase.beginSendObject receives
the information from SendObjectInfo and creates an row for it in the MTP objects
table for the new file. After the file transfer has completed, then
MtpDatabase.endSendObject is called. In endSendObject, we run the media scanner
on the new file, which will add a row to the images, audio, video
or audio playlist table.

To avoid the media scanner creating a second row for the file in the MTP objects
table, we pass the ObjectHandle created in beginSendObject to the media scanner,
which then passes it to the media provider via the content values when it
performs its insert.

Change-Id: I1ebcc63d6bd4404b0d3a93c703a9d3c097381d3a
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDatabase.h
tpServer.cpp
tpServer.h
7f53a190463274096155704276f3002c1620a364 09-Jul-2010 Mike Lockwood <lockwood@android.com> Remove some scafolding and test code that is no longer worth maintaining.

Change-Id: I9ee62d2463d8df1246a84774e8ac7e674778279a
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
tpDatabase.h
tpMediaScanner.cpp
tpMediaScanner.h
tpServer.cpp
tpServer.h
tpSqliteDatabase.cpp
tpSqliteDatabase.h
tpStorage.cpp
tpStorage.h
tpTypes.h
qliteDatabase.cpp
qliteDatabase.h
qliteStatement.cpp
qliteStatement.h
tptest.cpp
cantest.cpp
1865a5ddcfe7b0e8dc211419aea1094b1491a5fd 03-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: Use media provider database to implement MTP device support.

Uses a new "MTP objects" table in the media provider to support basic
enumeration of the external storage file system.
Support for accessing audio, video and image metadata in the existing
media provider tables will be added in a later commit.

The C++ MtpDatabase class is now abstract, to support a proxy subclass that
calls through JNI to the Java MtpDatabase class in the media provider.

Change-Id: I90f0db5f3acc5d35ae78c27a8507edff16d14305
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDataPacket.cpp
tpDataPacket.h
tpServer.cpp
tpServer.h
tpSqliteDatabase.cpp
tptest.cpp
dda7e2b7378755637f188cca7c5ae854427a28f7 03-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: remove separate audio table from prototype MTP database

Change-Id: I5e4b49b741a0a3c6ddf5afcbb20a0d7c9515c8ce
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
tpDatabase.cpp
tpDatabase.h
tpMediaScanner.cpp
tpMediaScanner.h
tpServer.cpp
tpSqliteDatabase.cpp
tpSqliteDatabase.h
tpTypes.h
8e2a280ab7f98bf00ff2651f1f93c8f8bd46c08d 02-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: Fix ownership and file permissions for transferred files and folders

All new files and folders are created with group sdcard_rw
Permissions for new files are 0664 and directories 0775

Change-Id: I6d508231150f687e2e529112fd47f10e30fa594f
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
tpServer.h
tptest.cpp
0250361b110267a139cc0865ff7d2f13b4d63bdf 02-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: Make MtpDatabase class abstract so we can have multiple implementations

Rename existing test database to MtpSqliteDatabase
This is the first step in transitioning to using the media provider database

Change-Id: I5f36c854c6e76a79137c267b000a52ced803776c
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
tpDatabase.cpp
tpDatabase.h
tpServer.cpp
tpServer.h
tpSqliteDatabase.cpp
tpSqliteDatabase.h
qliteDatabase.h
cantest.cpp
cff0ef94eccba9ce2f72380a238793f1702474b7 01-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: Remove an unnecessary thread from the MtpClient class.

Now a single thread is used for passing USB host events up to MtpClient.

Change-Id: I0e3a277956cb3d1036da122ea10acb03a27844d6
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpClient.cpp
tpClient.h
30cb2dd954f60047987b11020703c3bef1f8749f 01-Jul-2010 Mike Lockwood <lockwood@android.com> Try to fix the simulator build.

Change-Id: I3640e9eba433e711e23af1c6182e38c86c5b60bb
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
21ef7d0e70c5ad599bc2602cb484f8cd647055ca 30-Jun-2010 Mike Lockwood <lockwood@android.com> MTP: Implement GetObjectPropDesc

Change-Id: I283651257254fc9cd9d93eab4605c5e33d3db93e
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDevice.cpp
tpProperty.cpp
tpProperty.h
tpServer.cpp
tpServer.h
05a53a389852a9e52b816c087465f4e0c5009613 29-Jun-2010 Mike Lockwood <lockwood@android.com> MTP: Add MtpServer Java class to wrap MTP device support.

Change-Id: I818c2d3b3f52ad5bb515acc4d3288b2b43e11908
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
tpTypes.h
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>
tpClient.cpp
tpCursor.cpp
tpDataPacket.cpp
tpDatabase.cpp
tpDebug.h
tpDevice.cpp
tpDevice.h
tpDeviceInfo.cpp
tpMediaScanner.cpp
tpObjectInfo.cpp
tpPacket.cpp
tpProperty.cpp
tpRequestPacket.cpp
tpResponsePacket.cpp
tpServer.cpp
tpStorage.cpp
tpStorageInfo.cpp
tpStringBuffer.cpp
tpUtils.cpp
qliteDatabase.cpp
qliteStatement.cpp
tptest.cpp
c6588763ddc20541688e426a24b1b070527c051f 22-Jun-2010 Mike Lockwood <lockwood@android.com> MTP: Use a fd instead of a file path in file transfer ioctls.

This restricts the driver to the client's permissions when copying files
to avoid potential security problems.

Change-Id: I9b3151168d334fe4374875804d4ba82bef44db3b
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
_mtp.h
78c1e5ecb7a1c6474485c94276fb6c2bffebd2dc 15-Jun-2010 Mike Lockwood <lockwood@android.com> mtptest: Add option to specify storage path at the command line.

Change-Id: Iac8a34ffb8177018a9164b3f2f97b2e84c3d8f1c
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpStorage.cpp
tptest.cpp
6084a2964e346a036b58b1f4565ccbdefd518234 15-Jun-2010 Mike Lockwood <lockwood@android.com> MTP: Use stat.st_mode instead of dirent.d_type to determine file type.

dirent.d_type is not implemented on all file systems.

Change-Id: I50a01fd77a9f976f215e7ff98dd04f0f2611bbce
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpMediaScanner.cpp
c42aa12f73edf79bc9cb0dbf6b74a7f1af11c683 15-Jun-2010 Mike Lockwood <lockwood@android.com> MTP device: Read manufacturer name and serial number from system properties.

Change-Id: I8d1ad79f38aaaa50fa8899e6b614096af95fdf39
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
tpStorage.cpp
a177ae14b8cd9c1172cd166094cbffb2485325c2 14-Jun-2010 Mike Lockwood <lockwood@android.com> MTP: Fix uninitialized pointer bug.

Change-Id: Ia07ebd48aeb483e66957f5a174992d200494a744
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpDatabase.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>
tpDevice.cpp
tpDevice.h
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>
tpCursor.cpp
tpCursor.h
tpDataPacket.cpp
tpDataPacket.h
tpDevice.cpp
tpDevice.h
0ef2bf5df731114fce7307dc881b69d198b6d933 08-Jun-2010 Mike Lockwood <lockwood@android.com> MTP provider: Add columns for MTP ObjectInfo dataset to the MTP objects table

Signed-off-by: Mike Lockwood <lockwood@android.com>

Change-Id: Ife0563ad1c3b3dbc2461e1a9e784cbb4653b3435
tpCursor.cpp
tpObjectInfo.cpp
6a2736ba7bc19947a6c0bff4dca50595baa78b37 08-Jun-2010 Kenny Root <kroot@google.com> Include stdlib to fix sim build

Change-Id: I7732461a9351f53f9ddadcfb26485f2e553e056b
tp.h
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>
ndroid.mk
tpDataPacket.cpp
tpDataPacket.h
tpDevice.cpp
tpDevice.h
tpDeviceInfo.cpp
tpObjectInfo.cpp
tpProperty.cpp
tpProperty.h
tpStorageInfo.cpp
tpTypes.h
ab372f6738b7de287f9a9fa7e3ecb70a46ada359 04-Jun-2010 Mike Lockwood <lockwood@android.com> Merge "MTP: Add support for host cancellation of file transfers."
916076c6d84dac9b104fbdf94af5dcd7bce669fd 04-Jun-2010 Mike Lockwood <lockwood@android.com> MTP: Add support for host cancellation of file transfers.

Change-Id: I72df423f8017286e41adae525e6fbcb6b8440687
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpServer.cpp
tpServer.h
c8ca7dafbeef10218371bdfa13a76525c593343a 04-Jun-2010 Doug Kwan <dougkwan@google.com> Add missing library to linker command line.

Change-Id: Ia9ddf6e6bb5e72c32372a2f460806b6cbb7ec660
ndroid.mk
503f034df11972458cb980d2f4b70894b211b02f 04-Jun-2010 Jing Yu <jingyu@google.com> Add missing libraries, in order for gold to work.

gold is more strict than ld. If building A depends on libB directly,
we must specify -lB at link time.

Change-Id: Iac7cec58cbae5e0cbcfc9adab924db6733192d20
ndroid.mk
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>
ndroid.mk
tpClient.cpp
tpClient.h
tpCursor.cpp
tpCursor.h
tpDevice.cpp
tpDevice.h
tpTypes.h
tptest.cpp
fb570477389cf6157358df21945f22bc16d169f4 25-May-2010 Mike Lockwood <lockwood@android.com> MTP: adjust ptptest app for changes in libusbhost API.

Change-Id: I775e08c851a55d775b532129be11fb19515fbf6e
Signed-off-by: Mike Lockwood <lockwood@android.com>
tptest.cpp
e13401bf532c7e4bf9ab82c7e9b13642838a927d 19-May-2010 Mike Lockwood <lockwood@android.com> PTP host: Implement getObjectHandles and getObjectInfo commands

Change-Id: I3ff6e52237f400b4e50c534a1f964c80789bfe98
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
tpClient.cpp
tpClient.h
tpObjectInfo.cpp
tpObjectInfo.h
tpPacket.cpp
tpServer.cpp
tpTypes.h
tp.h
tptest.cpp
335dd2be955607f2632eabc25045857f2cc8b674 19-May-2010 Mike Lockwood <mike@spruce.(none)> More work on PTP host support.

Change-Id: Ifbd5bd5efa3cdb750ae1a2aae38181457554d34d
Signed-off-by: Mike Lockwood <mike@spruce.(none)>
ndroid.mk
tpClient.cpp
tpClient.h
tpDataPacket.cpp
tpDataPacket.h
tpDatabase.cpp
tpDatabase.h
tpDebug.h
tpDeviceInfo.cpp
tpDeviceInfo.h
tpMediaScanner.cpp
tpPacket.cpp
tpPacket.h
tpStorageInfo.cpp
tpStorageInfo.h
tpTypes.h
tpUtils.cpp
tpUtils.h
tp.h
tptest.cpp
fceef46513db3507b413f604cea89e3c7f352663 14-May-2010 Mike Lockwood <lockwood@android.com> MTP: More prototyping work:

New media scanner test program
Media scanner now cleans up after files that no longer exist
Separate database table for audio files
Extract metadata from audio files with libstagefright

Change-Id: I2bd0fe877836c741658e72fcfeb89c11be0d9b41
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
tpDatabase.cpp
tpDatabase.h
tpMediaScanner.cpp
tpMediaScanner.h
tpServer.cpp
tpStorage.cpp
tpStorage.h
tp.h
cantest.cpp
64a44220725dd05367beb15fd530b6c900f24e1a 16-May-2010 Mike Lockwood <lockwood@android.com> Add -p option to mtptest program to run in PTP mode instead of MTP

Change-Id: Idbd1437756daab8d6141db49b07d4eb0814c9e7e
Signed-off-by: Mike Lockwood <lockwood@android.com>
_mtp.h
tptest.cpp
7850ef999740f214a1990a9c090d3f3865d435aa 14-May-2010 Mike Lockwood <lockwood@android.com> Move MTP code to the android namespace

Change-Id: I5da48038fd5e4cdeefaeba42cdc74eb588b3448d
Signed-off-by: Mike Lockwood <lockwood@android.com>
tpClient.cpp
tpClient.h
tpDataPacket.cpp
tpDataPacket.h
tpDatabase.cpp
tpDatabase.h
tpDebug.cpp
tpDebug.h
tpPacket.cpp
tpPacket.h
tpRequestPacket.cpp
tpRequestPacket.h
tpResponsePacket.cpp
tpResponsePacket.h
tpServer.cpp
tpServer.h
tpStorage.cpp
tpStorage.h
tpStringBuffer.cpp
tpStringBuffer.h
tpUtils.cpp
tpUtils.h
qliteDatabase.cpp
qliteDatabase.h
qliteStatement.cpp
qliteStatement.h
tptest.cpp
tptest.cpp
67589f441aca391c27244cd231c2d770a9fe203d 13-May-2010 Mike Lockwood <lockwood@android.com> Exclude mtptest program from simulator builds.

Change-Id: Ia9751a06d7607363e8c16b71f6f3c524833395a0
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
16864bae0f51c32c456da2c43adf7a057c0c4882 11-May-2010 Mike Lockwood <lockwood@android.com> Checkpoint work on MTP and PTP investigation.

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>
ndroid.mk
tpClient.cpp
tpClient.h
tpDataPacket.cpp
tpDataPacket.h
tpDatabase.cpp
tpDatabase.h
tpDebug.cpp
tpDebug.h
tpPacket.cpp
tpPacket.h
tpRequestPacket.cpp
tpRequestPacket.h
tpResponsePacket.cpp
tpResponsePacket.h
tpServer.cpp
tpServer.h
tpStorage.cpp
tpStorage.h
tpStringBuffer.cpp
tpStringBuffer.h
tpUtils.cpp
tpUtils.h
qliteDatabase.cpp
qliteDatabase.h
qliteStatement.cpp
qliteStatement.h
_mtp.h
tp.h
tptest.cpp
tptest.cpp