169 Commits

Author SHA1 Message Date
Jared Suttles
5982013cfc Change the number of volume steps from 6 to 7 per Verizon Requirements
Submitted on behalf of Helen Tran <Helen.Tran@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
2009-08-13 21:27:55 -07:00
Wu-cheng Li
2ac8c27988 am cb2b2378: Merge change 20729 into donut
Merge commit 'cb2b2378c735e687c15e2af7f908c68ffae5fe90'

* commit 'cb2b2378c735e687c15e2af7f908c68ffae5fe90':
  Fix the bug that EXIF attributes are always cached.
2009-08-11 18:12:00 -07:00
Wu-cheng Li
b826bf9182 Fix the bug that EXIF attributes are always cached.
b2039501
2009-08-11 23:37:01 +08:00
Eric Laurent
d5603c126a AudioService now differentiates BT headsets and car kits.
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.
2009-08-07 10:31:53 -07:00
Android (Google) Code Review
20b153bffc am 5fd26775: Merge change 9390 into donut
Merge commit '5fd26775bdd14b15058521c82e34b562e0c1e327'

* commit '5fd26775bdd14b15058521c82e34b562e0c1e327':
  Name unknown albums after the folder they're in, similar to how songs
2009-08-03 11:54:18 -07:00
Marco Nelissen
4935d05eaa Untangle MediaPlayer, MediaRecorder, MediaScanner and MediaMetadataRetriever JNI
code, so that creating one of those doesn't initialize all the others. Shaves
a hundred milliseconds or so off music app startup time.
2009-08-03 11:32:30 -07:00
Marco Nelissen
c3c08ba5d6 Name unknown albums after the folder they're in, similar to how songs
with no title metadata are named after the file. Only files that are
in the root of the card will still belong to the "Unknown Album"
2009-07-31 15:02:25 -07:00
Android (Google) Code Review
ed95840681 am dccfaefd: Merge change 9285 into donut
Merge commit 'dccfaefd681a3895f6d4f9eedd106be817e1555d'

* commit 'dccfaefd681a3895f6d4f9eedd106be817e1555d':
  Clear singleton reference during JetPlayer.release()
2009-07-31 07:15:30 -07:00
Phil Dubach
176e650931 Clear singleton reference during JetPlayer.release()
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.
2009-07-30 17:59:02 -07:00
Eric Laurent
c42ac9d4d0 Fix issue 2019031: Volume changes have no effect.
Send initStreamVolume() for each stream when media server restarts.
Also added restoring of phone state, device connection state and forced device for communications.
2009-07-29 08:53:03 -07:00
Marco Nelissen
69f593ccb7 Support for selection of silent ringtone from the ringtone picker.
This doesn't actually enable that, but adds the necessary code to make it work when enabled, and cleans up some ringtone related code.
2009-07-28 16:06:38 -07:00
Eric Laurent
3026a023b8 Fix issue 2001517: AudioTrack compatibility issue.
Modified enum values in AudioFormat.java and AudioSystem.h.
Added code for backward compatibility in AudioTrack.java and AudioRecord.java.
2009-07-27 12:21:29 -07:00
Eric Laurent
d25ae67ca8 Fix issue 2004738: Settings Backup Agent consistently throws ArrayIndexOutOfBoundsException during restore.
Use stream alias when accessing VOLUME_SETTINGS array.
2009-07-27 02:12:30 -07:00
Ravi K Yenduri
974ff946d1 Add support for .aac and .asf extensions. 2009-07-24 11:26:30 -07:00
Eric Laurent
a553c25b33 Fix issue 1795088 Improve audio routing code
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()
2009-07-23 06:03:39 -07:00
niko
bc72692780 Added native metadata support.
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.
2009-07-22 15:03:22 -07:00
niko
6fa41bbb56 Minor cleanup in Metadata.java
Use a constant to express the size of a 32bits int.

In MediaPlayerMetadataParserTest, removed unused kTocken constant.
2009-07-20 13:53:29 -07:00
niko
c39173be32 Fixed a bug in the parser.
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.
2009-07-20 13:10:01 -07:00
Android (Google) Code Review
3e664221b6 Merge change 7747
* changes:
  Added 3 metadata types for pause/seek forward/seek backward.
2009-07-20 08:26:22 -07:00
Android (Google) Code Review
b8b117e1e7 am a8d5644b: Merge change 7726 into donut
Merge commit 'a8d5644b548263d68e2c9bfff58958b29c3525ff'

* commit 'a8d5644b548263d68e2c9bfff58958b29c3525ff':
  Fix issue 1985479	lots of backup NPEs.
2009-07-19 21:14:40 -07:00
Android (Google) Code Review
a8d5644b54 Merge change 7726 into donut
* changes:
  Fix issue 1985479	lots of backup NPEs.
2009-07-18 02:12:02 -07:00
Android (Google) Code Review
ab6ee15f8c am 474b0f29: Merge change 7686 into donut
Merge commit '474b0f2941430b97b4f24f16f7173e5249ccc8f2'

* commit '474b0f2941430b97b4f24f16f7173e5249ccc8f2':
  MediaScanner: Add check for null object in empty title handling code.
2009-07-17 15:42:59 -07:00
Nicolas Catania
716383a686 Added 3 metadata types for pause/seek forward/seek backward. 2009-07-17 13:26:44 -07:00
Eric Laurent
fd6e4820c6 Fix issue 1985479 lots of backup NPEs.
Check that stream type is not STREAM_BLUETOOTH_SCO before writting to settings.
2009-07-17 12:27:43 -07:00
Android (Google) Code Review
da3785ae9f Merge change 7624
* changes:
  Impl. of the metadata getters.
2009-07-17 12:00:28 -07:00
Mike Lockwood
bdc0e82f9c MediaScanner: Add check for null object in empty title handling code.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-17 08:17:45 -04:00
Nicolas Catania
cb2e00eedc Impl. of the metadata getters.
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)
2009-07-16 18:34:53 -07:00
Android (Google) Code Review
5b3f457845 am 58d19d1f: Merge change 7581 into donut
Merge commit '58d19d1f6321161fdcd10140fe7b9d9053f80bd2'

* commit '58d19d1f6321161fdcd10140fe7b9d9053f80bd2':
  Fix bug that would cause files with blank title tags to not be shown in the music app.
2009-07-16 17:54:27 -07:00
Marco Nelissen
55973f1aad Fix bug that would cause files with blank title tags to not be shown in the music app. 2009-07-16 14:12:11 -07:00
Nicolas Catania
a5ccb22a3d Partial implementation of the parsing of Parcel into Metadata.
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...
2009-07-15 13:27:49 -07:00
Nicolas Catania
5d55c71198 Basic plumbing to retrieve metadata from the native player.
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
2009-07-10 11:00:42 -07:00
Android (Google) Code Review
c494ba2544 Merge change 6636
* changes:
  Implemented the metadata changed notification filters.
2009-07-09 14:51:54 -07:00
Android (Google) Code Review
5e7e8da04d am b799616d: Merge change 6208 into donut
Merge commit 'b799616d8f0f94e866767fa730f56d82543fb49b'

* commit 'b799616d8f0f94e866767fa730f56d82543fb49b':
  Move ExifInterface to android.media package so we can reference it from MediaScanner.
2009-07-09 12:49:18 -07:00
Nicolas Catania
b2c693919b Implemented the metadata changed notification filters.
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.
2009-07-09 11:46:02 -07:00
Android (Google) Code Review
b799616d8f Merge change 6208 into donut
* 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.
2009-07-08 23:04:34 -07:00
Nicolas Catania
9193e08dc1 New Metadata API for the MediaPlayer.
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.
2009-07-08 09:47:29 -07:00
Android (Google) Code Review
f751c8c2ca am e9ac96f7: Merge change 6454 into donut
Merge commit 'e9ac96f76d513d2cee50dfea7d70b14669643ba9'

* commit 'e9ac96f76d513d2cee50dfea7d70b14669643ba9':
  Fix issue 1967295: Add a method to request reloading of audio settings by AudioService.
2009-07-08 09:25:12 -07:00
Eric Laurent
4050c93601 Fix issue 1967295: Add a method to request reloading of audio settings by AudioService. 2009-07-08 06:59:50 -07:00
repo sync
20b03ea70b 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.
2009-07-08 17:59:47 +08:00
Eric Laurent
fcc5be99e0 am 88e209dc: Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR
Merge commit '88e209dcf8c2ebddda5c272f46d1bd5478bc639c'

* commit '88e209dcf8c2ebddda5c272f46d1bd5478bc639c':
  Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR
2009-07-07 09:36:14 -07:00
Eric Laurent
88e209dcf8 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.
2009-07-07 07:10:45 -07:00
Android (Google) Code Review
6231e3a778 am ef1f21b3: Merge change 6231 into donut
Merge commit 'ef1f21b34f5624adb7436d3da927660ed16c97c7'

* commit 'ef1f21b34f5624adb7436d3da927660ed16c97c7':
  Don't trim() in the mediascanner, as that would remove the special "sort first" character.
2009-07-06 12:00:12 -07:00
Marco Nelissen
513d8068b4 am 899725b0: Make sure ringtones are sorted correctly.
Merge commit '899725b05dd5c8c51f9f802d4f0a7190532ce0a5'

* commit '899725b05dd5c8c51f9f802d4f0a7190532ce0a5':
  Make sure ringtones are sorted correctly.
2009-07-06 12:00:02 -07:00
Marco Nelissen
73bb511ade Don't trim() in the mediascanner, as that would remove the special "sort first" character. 2009-07-06 11:07:27 -07:00
Marco Nelissen
899725b05d Make sure ringtones are sorted correctly. 2009-07-06 10:57:01 -07:00
Nicolas Catania
20cb94eeb5 Direct api to the native media player.
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.
2009-06-24 08:22:52 -07:00
Android (Google) Code Review
cf01aa3cff am 1bee98af: Merge change 5100 into donut
Merge commit '1bee98af6532eba3c6cda636eee890530c95a2a7'

* commit '1bee98af6532eba3c6cda636eee890530c95a2a7':
  Fill in CDMA gaps and clean up ToneGenerator code
2009-06-23 13:42:41 -07:00
David Krause
b6d90ca129 Fill in CDMA gaps and clean up ToneGenerator code 2009-06-23 12:32:12 -07:00
Android (Google) Code Review
a877427e2f am 0e3d77af: Merge change 4324 into donut
Merge commit '0e3d77af4ec6cd4961cfb144045ee9dfe479ccf6'

* commit '0e3d77af4ec6cd4961cfb144045ee9dfe479ccf6':
  AudioService: Fix routing problem recently introduced in setRouting().
2009-06-16 08:37:50 -07:00
Mike Lockwood
d1f362fe14 AudioService: Fix routing problem recently introduced in setRouting().
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>
2009-06-16 08:23:13 -04:00