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
* commit 'fb6232635d339c83ca100e472b159f103dafb6e2':
DO NOT MERGE MediaScanner: reimplement the ".nomedia" feature for hiding files from the media provider
This will prevent MediaProvider from adding these files to the images table
Change-Id: Ice4756b64a067f3aceff08ab2c5e91665109dde5
Signed-off-by: Mike Lockwood <lockwood@android.com>
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>
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>
- 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>
This will prevent MediaProvider from adding these files to the images table
Change-Id: Ibc4128762f221b370a00e331aca633aafae0ad70
Signed-off-by: Mike Lockwood <lockwood@android.com>
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>
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>
- 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>
- 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
This will prevent MediaProvider from adding these files to the images table
Change-Id: I496a108b52a481c78dbf58c4e62996656b1fcbb9
Signed-off-by: Mike Lockwood <lockwood@android.com>
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>
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
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
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
through listener during video playback.
- Add OnTimedTextListener in the MediaPlayer
For feature request 800939.
Change-Id: I65072c27acb4c0037109a72be38c73e9f667420f
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
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
- 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
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
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
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