28 Commits

Author SHA1 Message Date
Mike Lockwood
d0e1a9f40e 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>
2010-07-01 11:39:42 -04:00
Mike Lockwood
0723394051 Try to fix the simulator build.
Change-Id: I3640e9eba433e711e23af1c6182e38c86c5b60bb
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-30 22:19:24 -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
98ef64e4a8 MTP: Add MtpServer Java class to wrap MTP device support.
Change-Id: I818c2d3b3f52ad5bb515acc4d3288b2b43e11908
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
42dbfa51ae 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>
2010-06-22 16:38:01 -04:00
Mike Lockwood
dff6e6e378 mtptest: Add option to specify storage path at the command line.
Change-Id: Iac8a34ffb8177018a9164b3f2f97b2e84c3d8f1c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-22 16:37:56 -04:00
Mike Lockwood
9eb5ac9cc7 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>
2010-06-14 23:00:30 -07:00
Mike Lockwood
622ccdc218 MTP device: Read manufacturer name and serial number from system properties.
Change-Id: I8d1ad79f38aaaa50fa8899e6b614096af95fdf39
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-14 17:59:46 -07:00
Mike Lockwood
44cf0a0682 MTP: Fix uninitialized pointer bug.
Change-Id: Ia07ebd48aeb483e66957f5a174992d200494a744
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-14 09:13:11 -07: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
f724eed566 MTP provider: Add columns for MTP ObjectInfo dataset to the MTP objects table
Signed-off-by: Mike Lockwood <lockwood@android.com>

Change-Id: Ife0563ad1c3b3dbc2461e1a9e784cbb4653b3435
2010-06-10 14:08:29 -04:00
Kenny Root
36a685d70f Include stdlib to fix sim build
Change-Id: I7732461a9351f53f9ddadcfb26485f2e553e056b
2010-06-08 08:38:34 -07: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
b0ccc7ca75 Merge "MTP: Add support for host cancellation of file transfers." 2010-06-04 07:20:16 -07:00
Mike Lockwood
a82d3c550b MTP: Add support for host cancellation of file transfers.
Change-Id: I72df423f8017286e41adae525e6fbcb6b8440687
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-04 09:49:21 -04:00
Doug Kwan
bebfb6aa0c Add missing library to linker command line.
Change-Id: Ia9ddf6e6bb5e72c32372a2f460806b6cbb7ec660
2010-06-03 22:49:34 -07:00
Jing Yu
42006894ed 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
2010-06-03 20:53:52 -07: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
Mike Lockwood
4f92fffc71 MTP: adjust ptptest app for changes in libusbhost API.
Change-Id: I775e08c851a55d775b532129be11fb19515fbf6e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-25 08:12:25 -04:00
Mike Lockwood
3743365114 PTP host: Implement getObjectHandles and getObjectInfo commands
Change-Id: I3ff6e52237f400b4e50c534a1f964c80789bfe98
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-19 15:16:38 -04:00
Mike Lockwood
5bae7f615b More work on PTP host support.
Change-Id: Ifbd5bd5efa3cdb750ae1a2aae38181457554d34d
Signed-off-by: Mike Lockwood <mike@spruce.(none)>
2010-05-19 12:38:03 -04:00
Mike Lockwood
d0782678df 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>
2010-05-18 16:12:38 -04:00
Mike Lockwood
9eff99e9d5 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>
2010-05-17 10:57:09 -04:00
Mike Lockwood
8d3257a7dc Move MTP code to the android namespace
Change-Id: I5da48038fd5e4cdeefaeba42cdc74eb588b3448d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-14 10:10:36 -04:00
Mike Lockwood
18ff7b4c37 Exclude mtptest program from simulator builds.
Change-Id: Ia9751a06d7607363e8c16b71f6f3c524833395a0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-13 16:28:00 -04:00
Mike Lockwood
56118b5b38 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>
2010-05-13 15:36:47 -04:00