26 Commits

Author SHA1 Message Date
Steve Block
3762c31172 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
2012-01-08 13:19:13 +00:00
Steve Block
6215d3ff4b 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
2012-01-04 20:05:49 +00:00
Steve Block
5baa3a62a9 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
2012-01-03 22:38:27 +00:00
Steve Block
71f2cf116a 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
2011-10-26 09:57:54 +01:00
Mike Lockwood
90f5d75cf0 MtpDevice: Handle zero length packets in readResponse()
Bug: 3509060

Change-Id: I291eefeaa667688c9e6e75da74ec3025b84065e9
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-14 10:33:22 -04:00
Mike Lockwood
8c553b9003 MTP host: disable some test code
Change-Id: I2237ad88f73b03a2c324f17267c52cc42b8a0d5b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-15 14:55:51 -05:00
Kenny Root
3d384f8edb Fix some memory leaks found in static analysis
Change-Id: Icd630009793c51acfaed45763ef50489ead40024
2011-02-02 14:07:10 -08:00
Mike Lockwood
1fce24b241 Add support for synchronous bulk USB transfers
Change-Id: Id5de49e4d728a702fa1583ecc24f83f36cc57d21
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-27 16:22:15 -08:00
Mike Lockwood
8182e72479 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>
2011-01-22 15:56:09 -08:00
Mike Lockwood
215b682b8a MTP: changes to use new usb_request support in libusbhost
Change-Id: Ic091eab166a66efcde0395dcebbbc513f2322fca
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-06 11:46:55 -05:00
Mike Lockwood
bfd1d72a1a 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>
2010-12-09 18:34:18 -08:00
Mike Lockwood
a194cc7d8b MTP: Support format argument in host GetObjectPropDesc command
Change-Id: Ic14313c0f95bea1d1d475cc6a001b256fccb91c8
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-07 18:53:04 -08:00
Mike Lockwood
e4880e421f MTP: Improve MtpProperty logging support
Change-Id: I46800b99763edcc5e994d912941f9f5e9b1c94d2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-07 17:13:12 -08:00
Mike Lockwood
5768f1089b MTP: Host support for GetObjectPropsSupported and GetObjectPropDesc
Change-Id: I6fd23587597fc68227dfb61118b097eda3e3e1d5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-07 10:58:56 -08:00
Mike Lockwood
929b3da2fc PTP: Fix permissions problems with files imported via PTP
Change-Id: I630a89c67e5b3d6d0c29e6c257f84e1909fa4de2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-19 13:55:22 -05:00
Mike Lockwood
954c267725 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>
2010-11-19 11:30:10 -05:00
Mike Lockwood
59e3f0db08 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>
2010-09-02 14:59:26 -04:00
Mike Lockwood
bb2b2a996b 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>
2010-07-27 12:38:33 -04:00
Mike Lockwood
456d8e6e67 MTP: Turn off excessive logging
Change-Id: Ib0dd8cb99efa324d0b4e742bffeb913d6122ace2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-27 12:38:29 -04:00
Mike Lockwood
bc4cb0bc79 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>
2010-07-26 20:40:45 -04:00
Mike Lockwood
767c5e4be0 MTP: Implement GetObjectPropDesc
Change-Id: I283651257254fc9cd9d93eab4605c5e33d3db93e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-30 17:02:07 -04:00
Mike Lockwood
3e6616dd3d MTP: replace printfs with logcat
Change-Id: I2c30921098e2dc049dc5fc1e0a548ead33c363e0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-30 13:59:32 -04:00
Mike Lockwood
e0a89f611d MTP: Add host support for deleting objects.
For example, deleting pictures on a digital camera.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-11 17:47:35 -04:00
Mike Lockwood
dda5686092 MTP: Add support for retrieving thumbnails to MTP content provider.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-10 16:58:03 -04:00
Mike Lockwood
90f4873446 MTP: host support for retrieving device property descriptors
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-07 09:34:41 -04:00
Mike Lockwood
755fd61725 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>
2010-06-01 22:12:44 -04:00