Merge commit 'cb2b2378c735e687c15e2af7f908c68ffae5fe90'
* commit 'cb2b2378c735e687c15e2af7f908c68ffae5fe90':
Fix the bug that EXIF attributes are always cached.
The BT headset detection now makes the difference between car kits and headsets, which can be used by audio policy manager.
The headset connection is also detected earlier, that is when the headset is connected and not when the SCO socket is connected as it was the case before. This allows the audio policy manager to suspend A2DP output while ringing if a SCO headset is connected.
Merge commit '5fd26775bdd14b15058521c82e34b562e0c1e327'
* commit '5fd26775bdd14b15058521c82e34b562e0c1e327':
Name unknown albums after the folder they're in, similar to how songs
Only one JetPlayer instance is supported at a time. A singleton reference is
created and returned in JetPlayer.getInstance(). When calling release() on the
instance, the corresponding native player is finalized. Therefore, release()
must also clear the singleton reference, so that any subsequent call to
getInstance() re-initializes the native player.
Send initStreamVolume() for each stream when media server restarts.
Also added restoring of phone state, device connection state and forced device for communications.
Initial commit for review.
Integrated comments after patch set 1 review.
Fixed lockup in AudioFlinger::ThreadBase::exit()
Fixed lockup when playing tone with AudioPlocyService startTone()
Metadata.java:
Fixed typo 8k != 8092. The comment was correct though.
In Metadata.h, the new Metadata class is declared in the ns android::media
to limit the chances of conflict with other packages.
The MetadataType in MediaPlayerInterface is gone and moved to Metadata as
an inner typedef.
Similarly the SortedVector<MetadataType> instance have been replace by a
new type Metadata::Filter.
All the keys declared in the java counterpart are also in Metadata.h.
Metadata.cpp:
Contains the implementation of the native metadata packing.
There an associated change in the opencore package that should go in
at the same time as this one.
When we parse the metadata we check that there is enough data in the parcel by checking
the byte availables and the size in the header.
Since the size is in the header has been read, we should make sure than dataAvailable() >= size - 4
This bug was hidden by some test code which has been removed.
In Metadata, implemented the method that unmarshall the data from
a metadata parcel an return java entities.
Add 2 new types of metadata (Boolean and Date) and fixed an issue
in TimedText: the w3c standard specify a duration as well as the
time to be played => added a duration field.
In MetadataParserTest.java:
Moved the util private methods at the bottom of the file.
Added new tests for the getters (GETTERS section)
Merge commit '58d19d1f6321161fdcd10140fe7b9d9053f80bd2'
* commit '58d19d1f6321161fdcd10140fe7b9d9053f80bd2':
Fix bug that would cause files with blank title tags to not be shown in the music app.
In this first cut, a raw parcel is parsed to check that the overall
format is correct.
At the same time, we record the metadata seen and their position in
the parcel for later retrieval using the get* methods.
This means that the 'has' method to check the existence of a metadata
should work.
Removed size and iterator methods. Instead, I added a new method
to give access to the set of keys. The user can make use of the set
to call size(), empty(), iterator() etc...
IMediaPlayer.h
Added a getMetadata method that mirrors the on in MediaPlayer.java.
MediaPlayer.java
Added a native method to get the metadata from the native player.
Parse the parcel into a Metadata object.
Metadata.java
Added a stub to parse the Parcel returned by the native player into
a set of metadata.
android_media_MediaPlayer.cpp
JNI call to forward the getMetadata call.
MediaPlayerService.cpp
MediaPlayerService::Client implements the new getMetadata method added in IMediaPlayer.h
Merge commit 'b799616d8f0f94e866767fa730f56d82543fb49b'
* commit 'b799616d8f0f94e866767fa730f56d82543fb49b':
Move ExifInterface to android.media package so we can reference it from MediaScanner.
IMediaPlayer:
new setMetadataFilter method so set a filter (2 lists of allowed and blocked metadata type)
serialized in a Parcel.
MediaPlayer.java/android_media_MediaPlayer.cpp/mediaplayer.cpp
new setMetadataFilter that passes the filter down to the MediaPlayerService's binder interface.
MediaPlayerService.cpp
The Client inner class holds the allowed and blocked metadata types.
These are in 2 vectors that get populated in the setMetadataFilter.
A new shourldDropMetadata method returns true if a type of metadata should be dropped according
to the filters.
The notify method in run the metadata update notifications thru the filter and possibly drop them.
* changes:
Move ExifInterface to android.media package so we can reference it from MediaScanner. Also hide public constructor and wrap common use cases as atomic operation to avoid race condition in jhead native codes.
MediaPlayer.java
New method getMetadata to fetch metadata from the player.
New method setMetadataFilter to filter metadata notification and fetches.
Metadata.java
Added basic interface. Implementation incomplete.
Merge commit 'e9ac96f76d513d2cee50dfea7d70b14669643ba9'
* commit 'e9ac96f76d513d2cee50dfea7d70b14669643ba9':
Fix issue 1967295: Add a method to request reloading of audio settings by AudioService.
Merge commit '88e209dcf8c2ebddda5c272f46d1bd5478bc639c'
* commit '88e209dcf8c2ebddda5c272f46d1bd5478bc639c':
Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR
Store sample rate on 32 bits instead of 16 bits in audio_track_cblk_t.
Removed sampleRate() methods from AudioTrack and AudioRecord: replaced by getSampleRate().
AudioTrack::setSampleRate() no returns a status.
Merge commit 'ef1f21b34f5624adb7436d3da927660ed16c97c7'
* commit 'ef1f21b34f5624adb7436d3da927660ed16c97c7':
Don't trim() in the mediascanner, as that would remove the special "sort first" character.
MediaPlayer.java has 3 new methods:
* newRequest creates a Parcel that can be used to send data to the
native player using invoke.
* invoke issues synchronous calls to the native player using opaque
parcels for the request and reply.
IMediaPlayer.h has 1 new abstract method:
* invoke
The Midi and Vorbis players have a stub for these. So far only PV
makes use of that new feature.
To avoid any copy overhead, the JNI interface uses Parcel as a java
object (no serialization/copy happens at the JNI layer).
The remote interface token is inserted when the Parcel is constructed
in java. That way the parcel is already routable when it reaches
IMediaPlayer.cpp (proxy). No extra copy is needed there.
Merge commit '1bee98af6532eba3c6cda636eee890530c95a2a7'
* commit '1bee98af6532eba3c6cda636eee890530c95a2a7':
Fill in CDMA gaps and clean up ToneGenerator code
Do not disable a route unless routes is zero, to avoid accidentally disabling
if the same route is enabled twice in a row.
Signed-off-by: Mike Lockwood <lockwood@android.com>