337 Commits

Author SHA1 Message Date
Jean-Michel Trivi
d327f21626 Implementation of the policing of transport control key press
events among multiple applications competing for the remote control
focus.
AudioManager defines a new API for applications to use in order to
register their BroadcastReceiver for the media button as the one
to receive the corresponding intent, but all applications at the
same time (in an ordered broadcast).
AudioService handles a stack of remote control focus owners. It
traps ACTION_MEDIA_BUTTON intents and sends a new intent to the
remote control focus owner.

Change-Id: I3c109221ecfb160cbb1ec0e40a71b241aad73812
2010-03-17 11:24:15 -07:00
Ray Chen
b4ca6ef994 Avoid overriding DATE_TAKEN by unreliable file time. MediaProvider will calculate it if needed.
Change-Id: I05cb8628f2333c26de5c05ee1c7676b8f79a5e9a
2010-03-09 14:23:23 -08:00
Jean-Michel Trivi
758559e6b7 Fix bug 2329540
Part 1 of the fix: when the user doesn't elect to use the car dock
 for music and media, the APM was not aware of the device being
 docked.
 This is fixed by dissociating the notification for the APM of
 the docking to the dock from the sink state change of the A2DP
 device.
 Also missing was forcing the volumes to be reevaluated whenever
 the device is docked or undocked, as volumes for docks may
 differ, even when the same output device is being used.

Change-Id: If5314e27821a71adbd6df6fdf887c45208241d96
2010-03-09 12:45:55 -08:00
Jean-Michel Trivi
eabb6df2fa Unhide API additions to AudioManager for AudioFocus support.
Change-Id: Ifc7d764703632eb91db11587675ae70ec14510e8
2010-03-09 09:15:19 -08:00
James Dong
ff846009ec Unhide CamcorderProfile and CameraProfile Java API
bug - 2375978
2010-03-04 21:49:35 -08:00
Ray Chen
7a67f156fb Remove native options. 2010-03-05 03:10:28 +08:00
James Dong
0fc6bc4cac Clean up MediaRecorder for public Java SDK
- update comments and fix a check in setAudioChannels()

bug - 2362412
2010-03-03 17:01:32 -08:00
Eric Laurent
31951ca52a Fix issue 2456968: Alarm rings in "silent mode and when Alarm in silent mode is turned off".
The problem is that even if silent mode is active, changing the alarm volume will change current
alarm stream volume. This is true for other stream types affected by ringer mode (ring, notification...) but
the UI design is such that it is not possible to change these volumes while in silent mode.

The fix consists in modifying AudioService.setStreamVolumeInt() so that when a stream is affected by ringer mode
and we are in silent mode, only the saved volume value is modified, current value remaining to unchanged (0).
2010-03-03 11:09:11 -08:00
Jean-Michel Trivi
d5176cfe6e First implementation of the audio focus management as an extension
of AudioManager and AudioService.
2010-03-02 08:39:26 -08:00
Daniel Sandler
6329bf7b1e New vibrate/silent mode behavior.
In earlier versions of Android, "vibrate mode" (in which
only alarms and media produce sound, but notifications may
operate the vibe motor) was only accessible by adjusting the
ringer volume (via the device's volume rocker) down until
the "vibrate" icon appeared (between the lowest ring volume
and silent mode).

Many users prefer that "silent mode" always allow vibration.
Others prefer Android's historical behavior, in which silent
mode stops the vibes as well.

To accommodate these two distinct usage patterns, we now
allow the user to decide whether vibration is allowed in
"silent mode", a user interface abstraction that now spans
both AudioManager.RINGER_MODE_VIBRATE and
AudioManager.RINGER_MODE_SILENT.

To minimize API impact (and therefore maximize backward
compatibility), RINGER_MODE_VIBRATE and RINGER_MODE_SILENT
remain unchanged. What has changed is what happens when the
user activates silent mode, either via Settings,
GlobalActions (longpress on power), volume rocker, or the
keyguard tab. In essence, there is now only one "silent"
position in these controls, and whether RINGER_MODE_VIBRATE
or RINGER_MODE_SILENT is actually set on the AudioService is
determined by a new one-off setting
(System.VIBRATE_IN_SILENT).  This new setting isn't meant to
be a long-term API, however: in the future we hope to
replace and extend this design with a much more
sophisticated set of systemwide feedback profiles. ETA TBD.

Related changes:
  * I09ad7d69 (GlobalActions and keyguard)
  * I22ba7bcf (Settings app)

Bug: 2457183
Change-Id: I14cf91b0910261ffdfd1bf302423f41ec747d057
2010-02-26 15:37:37 -05:00
Marco Nelissen
3d6c986d02 Merge "Make AsyncPlayer.startSound catch all exceptions instead of only a few. Two reasons for this: - it's used in the system process - it's run in a separate thread, so the user of AsyncPlayer cannot catch these exceptions" 2010-02-26 10:46:46 -08:00
Marco Nelissen
4ba297f3ed Make AsyncPlayer.startSound catch all exceptions instead of only a few.
Two reasons for this:
- it's used in the system process
- it's run in a separate thread, so the user of AsyncPlayer cannot catch these exceptions
2010-02-26 09:30:20 -08:00
James Dong
b93003649d Merge "Image encoding settings java API through xml configuration file" 2010-02-25 15:11:29 -08:00
James Dong
9b433f0b65 Image encoding settings java API through xml configuration file
- I decided to completely remove jpeg decoding related stuff from this change
  I think that setting is better off if it is specified by the system properties.
  We don't have to include MediaProfiles.h header in skia files
2010-02-24 18:10:12 -08:00
James Dong
f82c76656b Merge "Replace system property retrieval calls with DecoderCapabilities Java API calls." 2010-02-23 10:16:57 -08:00
Andreas Huber
b2d69e3d77 The MediaScanner is way too obsessed with restricting the files to be scanned.
related-to-bug: 2326148
2010-02-19 09:55:02 -08:00
Dave Sparks
0551311980 Unhide new SoundPool API's. Bug 2415373. 2010-02-17 13:29:08 -08:00
Jaikumar Ganesh
afdf85d435 Merge "Fix issue 2440226: Car dock volume synchronization." 2010-02-17 09:15:50 -08:00
James Dong
68db99ef76 Replace system property retrieval calls with DecoderCapabilities Java API calls. 2010-02-17 00:11:32 -08:00
Dave Sparks
675ee6ac36 Merge "Add SoundPool API to pause and resume all active streams. Bug 2426531." 2010-02-16 16:41:19 -08:00
Dave Sparks
f992cbb9aa Add SoundPool API to pause and resume all active streams. Bug 2426531. 2010-02-16 16:19:32 -08:00
James Dong
62ed7a6d4a Merge "Support decoder queries from media profiles xml configuration file" 2010-02-16 10:59:13 -08:00
Eric Laurent
9ce379aef1 Fix issue 2440226: Car dock volume synchronization.
AudioService now sends intent AudioManager.VOLUME_CHANGED_ACTION  when the volume is changed
on any stream type (previously the intent was sent only for STREAM_BLUETOOTH_SCO stream).
A new extra for previous volume value is added to the intent.
2010-02-16 06:40:20 -08:00
James Dong
d32fba411f Support decoder queries from media profiles xml configuration file 2010-02-12 18:15:45 -08:00
Andreas Huber
fbb3885024 New API on java's MediaPlayer to suspend/resume a session.
related-to-bug: 2231576
2010-02-12 12:44:10 -08:00
Eric Laurent
6015a97154 Fix issue 2418668: AudioManager isWiredHeadsetOn() always returns false for headset without mic. 2010-02-12 07:41:14 -08:00
Marco Nelissen
c5d5ee34d7 Add support for "album artist" tag. 2010-02-11 13:32:04 -08:00
Ray Chen
49ffc0ff72 Revise ThumbnailUtils API. 2010-02-11 10:26:34 +08:00
Marco Nelissen
bfcb22a207 Don't create a genre in the database for genre code 255 (unknown) 2010-02-10 09:31:12 -08:00
Dianne Hackborn
e83cefcef0 New external storage APIs.
This implements the spec for external storage organization, and
properly reflects how the media scanner organizes the files it finds.

Also includes package manager support for removing app private
files from external storage when the application is uninstalled.

For the new APIs and paths, the main place to look is Environment
and Context.
2010-02-09 14:20:55 -08:00
James Dong
760dcecd9d Merge "Camcorder profile Java API support - Use Enum for Quality instead of int - Use static values() method from Enum, rather than if-else" 2010-02-04 17:50:05 -08:00
James Dong
e7038ace44 Camcorder profile Java API support
- Use Enum for Quality instead of int
- Use static values() method from Enum, rather than if-else

bug - 2417312
2010-02-04 13:47:36 -08:00
Wu-cheng Li
5d9661be8e Add getAttributeDouble() and focal length tag.
bug:2375989
2010-02-04 16:11:38 +08:00
Ray Chen
3a8cab88e7 Add GpsDateTime support to ExifInterface and correct images table's date_taken value to UTC timestamp.
http://b/2376777
2010-02-02 18:59:03 -08:00
James Dong
c371194e4e Initial check-in for xml-based encoder capabilities retrieval
- Changed the Java API as suggested
- Treat /etc/media_profiles.xml as the default xml configurtion file
2010-02-01 22:38:37 -08:00
Ray Chen
bf124e7e41 Unhide ThumbnailUtils to support Camera unbundling.
http://b/2375978
2010-01-29 14:30:05 -08:00
Andreas Huber
2564300936 API Extension: Support for optionally specifying a map of extra request headers when specifying the uri of media data to be played.
related-to-bug: 2393577

Original change by Andrei Popescu <andreip@google.com>
2010-01-28 11:52:43 -08:00
Eric Laurent
23f25cda0c Fix issue 2378022: AudioService should direct volume control to STREAM_VOICE_CALL stream when STREAM_VOICE_CALL stream is active.
Modified AudioService.getActiveStreamType() so that STREAM_VOICE_CALL is selected when a track using this stream
type is playing.

Chanded isMusicActive() for a more generic isStreamActive(stream) method in AudioSystem, IAudioFlinger and AudioFlinger.
2010-01-25 14:00:10 -08:00
Eric Laurent
9272b4b4a4 Fix issue 2349345: Media sound output stuck on earpiece rather than speaker.
This change fixes a problem occuring when an application (for instance a VoIP application)
changes the audio mode to MODE_IN_CALL and crashes. In this case, the audio routing policy
remains as if we were in call until the audio mode is changed back to MODE_NORMAL, for instance when a new call
made or received and terminated.

The fix consists in registering a death receipient to the binder that made the setMode() request and resetting the audio
mode in case of client process crash.
2010-01-25 09:01:48 -08:00
Marco Nelissen
35b002a9c8 Make the media scanner disregard database entries that do not have
absolute path names. This allows us to store other things (perhaps
with http or content URIs) in the database, without the media scanner
removing them again.
2010-01-21 17:12:45 -08:00
Andreas Huber
1cb02bf661 Support for determining the mime type of media via metadata extraction. 2010-01-13 11:30:34 -08:00
Eric Laurent
84b42b8368 am d31d7397: am 663ec308: Fix issue 2361949: A2DP suspend parameters set wrongly.
Merge commit 'd31d7397ba26dcd913e96d06f0a8fd593780d629'

* commit 'd31d7397ba26dcd913e96d06f0a8fd593780d629':
  Fix issue 2361949: A2DP suspend parameters set wrongly.
2010-01-08 16:28:21 -08:00
Eric Laurent
d31d7397ba am 663ec308: Fix issue 2361949: A2DP suspend parameters set wrongly.
Merge commit '663ec308801a34de82db9ab993f0e906da690f89' into eclair-plus-aosp

* commit '663ec308801a34de82db9ab993f0e906da690f89':
  Fix issue 2361949: A2DP suspend parameters set wrongly.
2010-01-08 12:17:08 -08:00
Eric Laurent
663ec30880 Fix issue 2361949: A2DP suspend parameters set wrongly.
Move reset of A2DP suspend state from handleSinkStateChange() in BluetoothA2dpService to
BluetoothA2dp.ACTION_SINK_STATE_CHANGED intent receiver in AudioService.
Previous implementation could cause a false reset of suspend state if a new sink attempted to
connect while A2DP was suspended.
New implementation only resets A2DP suspend state when a new sink is actually connected.
2010-01-08 08:48:18 -08:00
James Dong
1b50044a27 Add MPEG to the file extensions that scanner cares 2010-01-06 12:18:02 -08:00
Marco Nelissen
9a488b44cb MediaFile.UNKNOWN_STRING -> MediaStore.UNKNOWN_STRING 2010-01-04 15:09:03 -08:00
Eric Laurent
a0b517609d am 68e9014e: am 484d2888: Fix issue 2299360: Change in in-call volume affects the Bluetooth in-call volume and vice versa.
Merge commit '68e9014e47f7350b3889e1704dde809b2a926968'

* commit '68e9014e47f7350b3889e1704dde809b2a926968':
  Fix issue 2299360: Change in in-call volume affects the Bluetooth in-call volume and vice versa.
2009-12-27 16:33:17 -08:00
Android (Google) Code Review
011a3dfd85 Merge change I9120be33
* changes:
  Add OnLoadCompleteListener to SoundPool.
2009-12-23 09:45:23 -08:00
Dave Sparks
f6e43bf290 Add OnLoadCompleteListener to SoundPool. 2009-12-23 09:11:29 -08:00
Eric Laurent
cf4fc6263c am f31f365a: am eb5ffc23: Merge change Id8e98194 into eclair
Merge commit 'f31f365a7708c931e955670bc6213fdc8f91a87a'

* commit 'f31f365a7708c931e955670bc6213fdc8f91a87a':
  Fix issues 2333450 and 2333559:
2009-12-22 23:46:16 -08:00