1152 Commits

Author SHA1 Message Date
James Dong
17524dc0d2 Clean up JNI code
o Move the Set/Map/Iterator calls from JNI to Java
o The JNI function receives arrays instead of Maps
o Removed Set/Iterator calls from the Java code as suggested

Change-Id: I34068bf24b61abaf2833dad1f65abc733ed760dd
2011-05-05 11:20:55 -07:00
Mike Lockwood
63de615ddb am 36132a48: DO NOT MERGE MediaScanner: Add special casing of WMP album art files to isNoMediaPath()
* commit '36132a488b2974db9a90da809c2f3eeab99a4427':
  DO NOT MERGE MediaScanner: Add special casing of WMP album art files to isNoMediaPath()
2011-05-04 08:57:59 -07:00
Mike Lockwood
f6df5b41e1 am fb623263: DO NOT MERGE MediaScanner: reimplement the ".nomedia" feature for hiding files from the media provider
* commit 'fb6232635d339c83ca100e472b159f103dafb6e2':
  DO NOT MERGE MediaScanner: reimplement the ".nomedia" feature for hiding files from the media provider
2011-05-04 08:57:37 -07:00
Marco Nelissen
863ee40964 am 7dd59229: DO NOT MERGE Fix media scanner uri handling.
* commit '7dd592298aefb7921afb86ced444d46cb30ac466':
  DO NOT MERGE Fix media scanner uri handling.
2011-05-04 08:57:33 -07:00
Mike Lockwood
21c0800f71 am d3e4290c: DO NOT MERGE MTP and media provider support for multiple storage devices:
* commit 'd3e4290c0442b6dcf24bcf642f4fc26d12d8e7aa':
  DO NOT MERGE MTP and media provider support for multiple storage devices:
2011-05-04 08:57:23 -07:00
Mike Lockwood
36132a488b DO NOT MERGE MediaScanner: Add special casing of WMP album art files to isNoMediaPath()
This will prevent MediaProvider from adding these files to the images table

Change-Id: Ice4756b64a067f3aceff08ab2c5e91665109dde5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-04 10:41:21 -04:00
Mike Lockwood
fb6232635d DO NOT MERGE MediaScanner: reimplement the ".nomedia" feature for hiding files from the media provider
Previously we ignored any files and directories that had name started with '.'
and ignored any directories that contained a ".nomedia" file.
Now to support transferring any file via MTP, we now add these previously ignored files
to the media database, but will not mark them as audio, video, image or playlist files.
That way they will be included in the files table but will be hidden from the
audio, video, images and playlist views that are used by apps like Music and Gallery.

Bug: 3405327

Change-Id: Ib707f329be98878501952b6054998518a6eabbbd
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-04 10:41:20 -04:00
Marco Nelissen
7dd592298a DO NOT MERGE Fix media scanner uri handling.
If a file was originally considered a video file (because it had
a .mp4 extension, for example), but was then discovered to have
only an audio track, it would update the type, but not the URI
for insertion into the media provider.

Change-Id: Ie589c9b52b436d73e295609d21238b2b3e829502
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-04 10:41:20 -04:00
Mike Lockwood
d3e4290c04 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: I53d501fd4891ebe27408135fb598027e06b7e495
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-04 10:41:20 -04:00
Mike Lockwood
c56ad54bd9 DO NOT MERGE MediaScanner: Add special casing of WMP album art files to isNoMediaPath()
This will prevent MediaProvider from adding these files to the images table

Change-Id: Ibc4128762f221b370a00e331aca633aafae0ad70
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-03 21:03:57 -04:00
Mike Lockwood
9c112a86de DO NOT MERGE MediaScanner: reimplement the ".nomedia" feature for hiding files from the media provider
Previously we ignored any files and directories that had name started with '.'
and ignored any directories that contained a ".nomedia" file.
Now to support transferring any file via MTP, we now add these previously ignored files
to the media database, but will not mark them as audio, video, image or playlist files.
That way they will be included in the files table but will be hidden from the
audio, video, images and playlist views that are used by apps like Music and Gallery.

Bug: 3405327

Change-Id: Ibb37bb2856a0684ce9f685ed565ad35347622834
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-03 21:03:56 -04:00
Marco Nelissen
1cf74fb3c4 DO NOT MERGE Fix media scanner uri handling.
If a file was originally considered a video file (because it had
a .mp4 extension, for example), but was then discovered to have
only an audio track, it would update the type, but not the URI
for insertion into the media provider.

Change-Id: I25652a031b98d2ec2433263dd6f344ba90d2d112
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-03 21:03:56 -04:00
Mike Lockwood
7ae938be1b 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>
2011-05-03 21:03:56 -04:00
Gloria Wang
c6091ddd3a Initial CL for the timed text support:
- Add support for MP4 timed text
- Add API for app to turn on/off a text track
- Add timed text metadata(language) in the MediaMetadataRetriever

Change-Id: I0055beba38ac761627dbcc6d581ae9582d68bb94
2011-05-03 16:41:17 -07:00
Mike Lockwood
ade06df0fe MediaScanner: Add special casing of WMP album art files to isNoMediaPath()
This will prevent MediaProvider from adding these files to the images table

Change-Id: I496a108b52a481c78dbf58c4e62996656b1fcbb9
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-02 18:53:45 -04:00
Gloria Wang
d01ec6eab0 Add setParameter/getParameter to MediaPlayer API.
for bug 1982947

Change-Id: If3f40e4f18cbba155af29944af38bdc627f8cd53
2011-04-29 10:24:03 -07:00
Mike Lockwood
997354e4b4 MediaScanner: reimplement the ".nomedia" feature for hiding files from the media provider
Previously we ignored any files and directories that had name started with '.'
and ignored any directories that contained a ".nomedia" file.
Now to support transferring any file via MTP, we now add these previously ignored files
to the media database, but will not mark them as audio, video, image or playlist files.
That way they will be included in the files table but will be hidden from the
audio, video, images and playlist views that are used by apps like Music and Gallery.

Bug: 3405327

Change-Id: I2d7285bd32e06c1a5c4ef6a8a15f8f8b2c33b39b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-04-25 09:21:54 -07:00
Dianne Hackborn
4c1f4f7144 Merge "Rework display size access." 2011-04-21 16:10:28 -07:00
Dianne Hackborn
f50e54e64b Remove config_caseSensitiveExternalStorage; no longer needed.
Change-Id: Id51c9e05be21d8087359cf918081109ba325569a
2011-04-21 15:20:34 -07:00
Dianne Hackborn
44bc17c6b5 Rework display size access.
Applications now get the display size from the window manager.  No
behavior should be changed yet, this is just prep for some real
changes.

Change-Id: I2958a6660895c1cba2b670509600014e55ee9273
2011-04-21 15:17:52 -07:00
Andreas Huber
72e738a428 Unhide MediaPlayer's setDataSource method that takes optional http headers to be
passed to the server.

Change-Id: I3c7ce140b2d9cd2483cf05c8aff9b374feff2f18
related-to-bug: 4315346
2011-04-20 10:55:54 -07:00
Jean-Michel Trivi
2c3bf8e93d Merge "Fix bug 2659754 ConcurrentModificationException in audio focus changes" 2011-04-18 11:20:20 -07:00
Jean-Michel Trivi
95814b0268 Merge "Fix bug 2724503 Persist media button receiver across reboots" 2011-04-18 11:02:34 -07:00
Jean-Michel Trivi
72843377d5 Fix bug 2659754 ConcurrentModificationException in audio focus changes
While iterating over the audio focus stack or the media button
 receiver stacks, do not modify the stack other than through the
 iterator object.

Change-Id: Ice8827e7d29afed72b40c93edf7401cd54ba4b0c
2011-04-18 10:21:27 -07:00
Jean-Michel Trivi
d589fea865 Fix bug 2724503 Persist media button receiver across reboots
Whenever a new media button receiver is registered, save it
 in the settings.

When the system audio settings are reloaded or when the
 AudioService is created, the registered media button receiver
 is restored.

Whenever a package is removed from the system, remove
 any media button receiver from the same package that are in
 the media button receiver stack. If this causes the currently
 registered receiver to change (i.e. the top of the stack),
 this will cause an update of the receiver stored in the
 system settings.

Note that unregistering a media button receiver will not
 cause the receiver saved in the settings to be updated,
 this is ON PURPOSE. This is to prevent well behaved
 application who unregister their receiver at the destruction
 of their service, to not receive the intent after a reboot,
 and to not encourage applications to never unregister
 their receiver.

Change-Id: I941b777debaa56e88de93c3b03aec40331ea9ab1
2011-04-18 10:07:01 -07:00
Gloria Wang
162ee49e1c - Add another parameter in notify() to be able to send timed text sample
through listener during video playback.
- Add OnTimedTextListener in the MediaPlayer
For feature request 800939.

Change-Id: I65072c27acb4c0037109a72be38c73e9f667420f
2011-04-13 11:11:34 -07:00
Joe Onorato
43a17654cf Remove the deprecated things from Config.java. These haven't been working since before 1.0.
Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
2011-04-07 19:23:05 -07:00
Jean-Michel Trivi
d07f6a7934 Merge "Bug 4231349 fix error in javadoc for android.media.MediaPlayer" 2011-04-06 14:46:17 -07:00
Jean-Michel Trivi
ea763069b1 Bug 4231349 fix error in javadoc for android.media.MediaPlayer
In the javadoc for MediaPlayer.OnBufferingUpdateListener,
the percent parameter for onBufferingUpdate() is described as:
  the percentage (0-100) of the buffer that has been filled thus far

This is incorrect. This percentage is the ratio of (current position
+ content buffered) relative to the total duration.
Also buffering updates are only sent for progressive HTTP download.

Change-Id: I9f346a150b39fa1f7b17126119ecc0d7d27fbfbe
2011-04-06 14:42:18 -07:00
Glenn Kasten
85b65f2008 Merge "Miscellaneous code cleanup in audio framework" 2011-04-06 13:03:11 -07:00
Glenn Kasten
ed0079dddd Miscellaneous code cleanup in audio framework
Changes:
 - Move declaration of kClassPathName to top of file so it can be used
   in more than one place, instead of "android/media/AudioSystem".
 - Make private methods static.
 - Add comment to stream_type, audio_mode, force_use types that they must match
   values in AudioSystem.java.
 - Add comment about unused types mp3_sub_format and vorbis_sub_format.
 - Fix typos.
 - Use @ in javadoc comments.
 - Delete dead APIs setMode, getMode, setRouting, getRouting in AudioSystem.java
   (they are all hidden, deprecated, and unused by rest of framework)
 - Delete unused private log method.
 - Fix pathname for android_media_AudioSystem.cpp.
 - Improve code formatting for space after == and !=.
 - Add logging of delta for changing audio policy manager ref count.

Change-Id: I18037c7beb8ab76d1fda08c11e589f6e591d36e1
2011-04-06 10:24:18 -07:00
Mike Lockwood
b239b68376 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: Iffb66ed156ef5bc80b14228af78fbacee7734360
2011-04-05 15:19:16 -04:00
Mike Lockwood
8538149572 am 1c56976a: am 38f04c0f: am 11dd5ae9: Improve Javadoc for USB Manager and MTP/PTP support.
* commit '1c56976a774434bd279b6181c4fc3c555c4648c2':
  Improve Javadoc for USB Manager and MTP/PTP support.
2011-04-01 11:38:52 -07:00
Mike Lockwood
1c56976a77 am 38f04c0f: am 11dd5ae9: Improve Javadoc for USB Manager and MTP/PTP support.
* commit '38f04c0f28fc59bc7e893ca6a1ffc4d0745ab8c2':
  Improve Javadoc for USB Manager and MTP/PTP support.
2011-04-01 11:37:05 -07:00
Mike Lockwood
11dd5ae97b Improve Javadoc for USB Manager and MTP/PTP support.
Bug: 4091519

Change-Id: Ida79593d5a984f7ffd0934ae7bded23b8faf9eef
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-04-01 14:11:50 -04:00
Brad Fitzpatrick
36bafb0b7d am 0ddcc8bc: am b618b2ef: am f0dbf00d: Merge "Handle OutOfMemoryError when decoding images in ThumbnailUtils"
* commit '0ddcc8bc60ffa00e103f420f95b7f8a7c77639b6':
  Handle OutOfMemoryError when decoding images in ThumbnailUtils
2011-03-30 16:38:03 -07:00
Andreas Huber
cabb7da712 Support for divx files, i.e. mpeg 4 video + mpeg audio layer III in .avi files
Change-Id: I6e1e989c43300ddb0d341e3e9183cdccd69eeae6
related-to-bug: 4192562
2011-03-30 13:13:25 -07:00
Brad Fitzpatrick
0ddcc8bc60 am b618b2ef: am f0dbf00d: Merge "Handle OutOfMemoryError when decoding images in ThumbnailUtils"
* commit 'b618b2ef8722964730d09a86a06a85ca34df6de4':
  Handle OutOfMemoryError when decoding images in ThumbnailUtils
2011-03-30 08:20:58 -07:00
James Dong
5c8eff3308 Merge "Fix missing cross-ref links in the MediaPlayer.java javadoc" 2011-03-29 15:17:47 -07:00
Marco Nelissen
30ec6c2bf5 Merge "Fix media scanner uri handling." 2011-03-29 15:16:55 -07:00
Marco Nelissen
3e5e805594 Fix media scanner uri handling.
If a file was originally considered a video file (because it had
a .mp4 extension, for example), but was then discovered to have
only an audio track, it would update the type, but not the URI
for insertion into the media provider.

Change-Id: Ifdf3a177750f1e71ca5a058fa534d272e1505653
2011-03-29 13:29:42 -07:00
Andreas Huber
eecadb9a84 Adding support for the '.mxmf' MIDI file extension.
Change-Id: Ic73e2f843f8640dd794d090413cf63232f0182b9
related-to-bug: 4186454
2011-03-29 13:17:30 -07:00
James Dong
c36b3c6956 Fix missing cross-ref links in the MediaPlayer.java javadoc
Change-Id: Ie5fba234d226ff792661ec346ddf87f43b5a0dc7
2011-03-29 12:16:59 -07:00
Christer Fletcher
375fb9bfd2 Handle OutOfMemoryError when decoding images in ThumbnailUtils
Added handling of OutOfMemoryError handling to createImageThumbnail
method in ThumbnailUtils.java. During mediascanner run it would run
out of memory when trying to decode very large images. Now it handles
this error and returns null which is handled by the media scanner.

Change-Id: Ie68722dfa1cedd3c0847bf483baa40c4827ad5a8
2011-03-28 14:47:55 +02:00
Eric Laurent
602b3286ff Fix issue 3509396: AudioEffect.getParameter JAVA.
Removed dead/buggy code in AudioEffect.getParameter() and
AudioEffect.command() that was meant to return the actual length of
meaningful data in the returned parameter or command reply.

This is replaced by the method return status indicating this length when
positive (negative return codes still indicate the same errors as before).

Modified automated AudioEffect tests accordingly.

Change-Id: Ie89617f912766b8dee73b81f92af9c48027c982d
2011-03-21 17:11:59 -07:00
Andreas Huber
5b7ced6a4e Support passing headers to MediaMetadataRetriever's setDataSource API
Change-Id: Ib1a5c08fc5034cac05034db27007a35c9b660b26
related-to-bug: 3506316
2011-03-21 11:13:59 -07:00
Eino-Ville Talvala
ce06ebfda4 Merge "Add support for timestamps into SurfaceTexture." 2011-03-17 15:52:34 -07:00
Eino-Ville Talvala
c5f94d8a47 Add support for timestamps into SurfaceTexture.
API addition: The timestamps are represented as nanoseconds from some
arbitrary time point. Like the SurfaceTexture transform matrix, the
timestamp retrieved by getTimestamp is for the last frame sent to the
GL texture using updateTexImage().

Camera HAL change: Expect vendors to set these timestamps using
native_window_set_buffers_timestamp().  For now, they are
autogenerated by SurfaceTextureClient if set_buffers_timestamp() is
never called, but such timing is likely not accurate enough to pass a
CTS test.

bug:3300707

Change-Id: Ife131a0c2a826ac27342e11b8a6c42ff49e1bea7
2011-03-17 13:10:03 -07:00
Mike Lockwood
630e6d7d26 am 132b23f8: am c97022e7: am 11473332: Merge "MtpServer: Do not attempt to stop MTP if it has not been started" into honeycomb-mr1
* commit '132b23f84905060163be6a30d718074cd4e1770d':
  MtpServer: Do not attempt to stop MTP if it has not been started
2011-03-17 07:30:53 -07:00
Mike Lockwood
a3f8514492 MtpServer: Do not attempt to stop MTP if it has not been started
Fixes an ANR that occurred if we got a USB disconnected event
before the MTP service had started.

Bug: 4118033

Change-Id: I6cad4281a5911a9926cae923f34d3a6bf98346c5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-17 09:43:50 -04:00