249 Commits

Author SHA1 Message Date
Dheeraj Sharma
b21827d1bc Video Editor:Fix for 3375632
Change-Id: I354b8b653ea0ccddda49a6e530ad63b5bd44a5b2
2011-01-23 11:55:47 -08:00
Mike Lockwood
47063a859a Merge "New APIs for MTP and PTP host support" 2011-01-22 15:59:28 -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
2d044d1ff9 Merge "Remove MTP related log spam" into honeycomb 2011-01-22 14:35:39 -08:00
Mike Lockwood
f26a586c86 Remove MTP related log spam
Change-Id: I9de1792cbeec07fa5ab42ff9a10813f0c3d30fc1
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-21 21:00:54 -08:00
Carl Shapiro
8f995b5f6d Remove dead code referencing an obsolete interface.
Bug: 3378919

Change-Id: I780d98492ea7996187e3d97fcae7748f7ee68e91
2011-01-21 16:10:08 -08:00
Carl Shapiro
ae12a50a35 Perform orthogonal rotations without using a Skia canvas.
Bug: 3371653

Change-Id: I315f671c0016f61417ff7c2a98d2c96f6b243bdf
2011-01-21 14:45:14 -08:00
Dharmaray Kundargi
fe93351cf1 Merge "remove eng developement local tags in make file" into honeycomb 2011-01-19 14:02:12 -08:00
Dharmaray Kundargi
6dbd3ee67b remove eng developement local tags in make file
Change-Id: I24511cd588c19592bce57e36ccadbf1fb4d44647
2011-01-19 12:14:46 -08:00
James Dong
581cad2221 Turn error/exception logging on at the native layer
o also fixed some compilation warnings

Change-Id: I66fc1f9972e9fb4b9a25ff3e5835d744d6c71455
2011-01-19 11:42:53 -08:00
Mike Lockwood
897f894e88 MTP: Close and reopen driver file after an error.
BUG: 3368665

Change-Id: Ib1580c0e98a4d192aa0c213406fd3bafae597ec0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-19 10:11:28 -08:00
Mike Lockwood
a1c9180461 MTP: Fix problem with MTP starting up on the first try.
BUG: 3361230

Change-Id: Ibc2e8adf24a14ea18385b306e786a77983ff8f5b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-18 20:11:29 -08:00
James Dong
0a3dbf6f69 Merge "Fix the build break in git_master-without-vendor" into honeycomb 2011-01-18 13:26:14 -08:00
Dharmaray Kundargi
a1a55bbe94 Fix the build break in git_master-without-vendor
Change-Id: I8fff5ee69958212a80711e0d86fb86514c8797f4
2011-01-18 12:40:56 -08:00
Mike Lockwood
7a0bd17bce 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>
2011-01-18 11:07:11 -08:00
Dharmaray Kundargi
cd196d3727 videoeditor JNI files on honeycomb
Change-Id: I2e6a23ae918fda4fb1bc4c2c938efd546991b58c
2011-01-16 19:19:07 -08:00
James Dong
4507cef05e Remove legacy code that should not be used
Change-Id: I9209e3a32b64a30627848d2a425f32ed6b73e8a2
2011-01-12 16:38:45 -08:00
James Dong
11eab056dd Publish MediaMetadataRetriever.java as public API
o Removed setMode() methods and related mode constants
o Removed some of the unused the metadata keys
o Updated the javadoc

o part of a multi-project change.

bug - 2433195

Change-Id: I5ed167f1fd6a53cb143b7dc385b149431d434438
2011-01-12 14:14:11 -08:00
Eric Laurent
a60e212d0d Fix issue 3261656.
The problem can occur if a sample is started at the same time as the last AudioTrack callback
for a playing sample is called. At this time, allocateChannel() can be called concurrently with moveToFront()
which can cause an entry in mChannels being used by moveToFront() to be erased temporarily by allocateChannel().

The fix consists in making sure that the SoundPool mutex is held whenever play(), stop() or done() are called.

In addition, other potential weaknesses have been removed by making sure that the channel mutex is held while
starting, stopping and processing the AudioTrack call back.

To that purpose, a mechanism similar to the channel restart method is implemented to avoid stopping channels
from the AudioTrack call back but do it from the restart thread instead.

The sound effects SounPool management in AudioService has also been improved to make sure that the samples have
been loaded when a playback request is received and also to immediately release the SoundPool when the effects are
unloaded without waiting for the GC to occur.
The SoundPool.java class was modified to allow the use of a looper attached to the thread in which the sample
loaded listener is running and not to the thread in which the SoundPool is created.

The maximum number of samples that can be loaded in a SoundPool lifetime as been increased from 255 to 65535.

Change-Id: I368a3bdfda4239f807f857c3e97b70f6b31b0af3
2011-01-07 17:17:10 -08:00
Mike Lockwood
27480cd494 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>
2011-01-06 11:47:56 -05:00
James Dong
df9b349b96 Replace extractAlbumArt() with getEmbeddedPicture() in MediaMetadataRetriever.java
Change-Id: I34dfc1daa3bed1f334f3f266cbe70d1e3d7924f6
2011-01-04 15:03:48 -08:00
Mike Lockwood
0cd0136d44 Move MTP Java classes to android.mtp.* package.
Change-Id: Ib18bcaabf314241a95e517d0b93be5845d988e2c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-30 11:54:33 -05:00
Mike Lockwood
da03aaad78 Change libusbhost and libmtp from static to shared libraries
Change-Id: Iccc67db32400cdeb88aa33261c9e0cf73db992ca
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-29 09:12:15 -05:00
James Dong
0e4b535b43 Avoid using private Bitmap constructor to generate bitmaps
bug - 2433195

Change-Id: Ic74225286c9884055ae751cf76a1d65e8e70b3ae
2010-12-22 11:45:42 -08:00
Mike Lockwood
076e05b488 MediaScanner: Add support for scanning empty directories
Currently the media scanner does not create database entries for directories
unless they contain a file that is scanned.
Fixing this so we provide a consistent view of the world to MTP.

Change-Id: Ia776acfeae23192183e7192d63cdc34d830ea889
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-16 15:35:36 -08:00
James Dong
88b7741228 Fix media metadata retriever JNI due to a change to the private native Bitmap constructor signature
Change-Id: I48c94b7a77a717c15fac548c7068a8a3e62c79fb
2010-12-14 22:13:14 -08:00
Mike Lockwood
1b198ea685 MTP: Create files/folders with group media_rw instead of sdcard_rw
Otherwise the sdcard daemon that implements the Fuse file system at
/mnt/sdcard won't have write access to the files.

BUG: 3254123

Change-Id: Ib0c306bbc31ec936fd6164f17e7cd1b5dfff21b8
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-13 20:11:15 -08:00
Mike Lockwood
7f36b19b6b 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>
2010-12-12 12:17:43 -08:00
Mike Lockwood
2711e494ca MTP: Check for null string before calling GetStringUTFChars() in MtpDatabase JNI
BUG: 3274649

Change-Id: I5a3c8fcebf71ed453a121ca5a1345e39895d3bf3
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-11 11:29:31 -08:00
Mike Lockwood
365e03e494 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>
2010-12-08 16:09:37 -08:00
Mike Lockwood
9b5e9c407d MTP: pass format back as default value in GetObjectPropDesc for format property
Change-Id: Icc4071af16763a613c9fb31e87dc716f1516c7d8
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-07 18:53:50 -08:00
Mike Lockwood
ea93fa16b1 MTP: Implement MTP_DEVICE_PROPERTY_IMAGE_SIZE device property.
Return screen size as preferred maximum image size.

Change-Id: I8dc4afb0e49fe45f6925a35aa443d3fc30211453
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-07 10:41:35 -08:00
James Dong
faf09ba940 Prepare for publishing MediaMetadataRetriever as public API
step one:
o replaced captureFrame with getFrameAtTime
o removed getMode

bug - 2433195

Change-Id: I38a8cecef29014692f0b08b8818326e3ebb40a12
2010-12-03 15:32:47 -08:00
Mike Lockwood
7d7fb63071 MTP: Add support for multiple properties in GetObjectPropList command
Change-Id: Ib469a6c8141937aaa3e811345056195117abb4b2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-02 08:16:12 -05:00
Mike Lockwood
5b19af05f2 MTP: Use DateTime form in GetObjectPropDesc for date/time properties.
Change-Id: I5a3c0b07a9f2958b86947256606e6a824dbe93a6
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-23 18:38:55 -05:00
Mike Lockwood
5a2755d0c9 Rename MtpCursor to PtpCursor
Change-Id: I8ce257641388b195f3e17995d323355b19355dc1
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-23 12:25:49 -05:00
Mike Lockwood
c0b8b321d5 Rename MtpClient and MtpCursor to PtpClient and PtpCursor
Change-Id: I26fce3bf32c8e9c8d592106af7ab4c35b19e0996
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-23 10:30:31 -05:00
Eric Laurent
d48124e0fe Merge "Fix issue 3157123." 2010-11-19 15:58:24 -08:00
Eric Laurent
f3d6dd0782 Fix issue 3157123.
Use a Mutex wherever atomic operations were used in AudioTrack,
AudioRecord, AudioFlinger and AudioEffect classes.

Change-Id: I6f55b2cabdcd93d64ef19446735b8f33720f8dbc
2010-11-19 15:49:42 -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
413577d860 MTP: Fixes to allow file transfers > 4 gigabytes
BUG: 3198248

Change-Id: I6f11c79a19d7bdd63718a7370939124b1262d221
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-17 16:43:24 -05:00
Mike Lockwood
3159991e58 MTP: Fix time values returned via GetObjectPropValue and GetObjectPropList
Change-Id: If9bb8b4b19ed6c8d57736e5d1af948fcc946af0e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-15 14:10:04 -05:00
Mike Lockwood
e2ad6ec171 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>
2010-11-15 11:46:51 -05:00
James Dong
d1959717c2 am c4a2ead2: am d2d62d04: Merge "Support extracting thumbnail from rotated video tracks" into gingerbread
* commit 'c4a2ead2aa5ab4403553e4956ba71b44782f0c84':
  Support extracting thumbnail from rotated video tracks
2010-11-08 19:25:41 -08:00
James Dong
53ebc72fd8 Support extracting thumbnail from rotated video tracks
Change-Id: Ife0a2536aaac5ff1efdf1035b9d2c892773ee16c
2010-11-08 16:52:59 -08:00
Andreas Huber
69b8d69aad Squashed commit of the following:
commit 0d5694ba2d399dd0869532a4d6256448185a1be0
Author: Andreas Huber <andih@google.com>
Date:   Fri Oct 29 11:59:23 2010 -0700

    suspend() and resume() methods on VideoView are back but don't do anything.

    They need to be back because they were public before.

    Change-Id: Iddfd1021ffcf341f26e8d55ba761fd33701e2425

commit 16192891ed7d349ee97e47d1729d20a2d0d247b8
Author: Andreas Huber <andih@google.com>
Date:   Fri Oct 29 11:47:05 2010 -0700

    Revert "New API on VideoView widget to suspend/resume a session. Do not release the MediaPlayer client for video suspending/resuming."

    This reverts commit 2e1818a4d16c3309660f27286c77d8d1eee95a25.

    Conflicts:

    	api/current.xml

    Change-Id: I68dd1d05871044faf3f832d0838aa40bc7f890e5

commit 8f934dc1a3ae4e60f0790fcf97671e063fa20fad
Author: Andreas Huber <andih@google.com>
Date:   Fri Oct 29 11:44:16 2010 -0700

    Revert "Release mediaplayer if the current state is not suspending. Fix for bug 2480093."

    This reverts commit efb882cf75eef39ecaf9f8920ed302a019fa629f.

commit f2ed03550887986f39d36b5dabcd9e919949c7cf
Author: Andreas Huber <andih@google.com>
Date:   Fri Oct 29 11:44:08 2010 -0700

    Revert "Release MediaPlayer if suspend() returns false."

    This reverts commit 047212fd4ea360675e94d3ce83c7f5544f65b268.

commit 441ecce678bd24e9660a72c8627b5bd94433ff8b
Author: Andreas Huber <andih@google.com>
Date:   Fri Oct 29 11:40:46 2010 -0700

    manually.

    Change-Id: I4fdd43c9f7c8b3eedddb31a196da4984e1c58e87

Change-Id: I60d4b10e7a9e4ed8d9a796f1711618f557eb6e89
2010-10-29 13:20:06 -07:00
Eric Laurent
4de82c7885 am 5a9d2737: am b6a2256e: Merge "Fix issue 3126094." into gingerbread
Merge commit '5a9d2737181768a1da54d4e7fb00a6b1b86b3860'

* commit '5a9d2737181768a1da54d4e7fb00a6b1b86b3860':
  Fix issue 3126094.
2010-10-22 22:47:52 -07:00
Eric Laurent
cc02ac54ac Fix issue 3126094.
android_media_Visualizer.cpp:
Delete local reference to jArray in captureCallback() in
the case of waveform capture.

Change-Id: Ia822ab6d9945fff93605f7732e56120c19fd42a5
2010-10-22 18:08:13 -07:00
Mike Lockwood
6a6a3aff17 MTP: allow renaming directories
Change-Id: I90849e7924f33a2f39dae400968f2eda64710beb
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-10-12 14:19:51 -04:00