1739 Commits

Author SHA1 Message Date
Marco Nelissen
803db1646a am aeb62686: Merge "Fallback to fallbackring if ringtone can\'t be played."
* commit 'aeb6268645d571dfc9f2d387a7ad2471039ddb54':
  Fallback to fallbackring if ringtone can't be played.
2012-11-16 13:03:33 -08:00
Oscar Rydhé
1c25a21ffc Fallback to fallbackring if ringtone can't be played.
If the specified ringtone file exists but cannot be played
the Ringtone will try to play the ringtone in a remote player.
But since the file is corrupt it will not be played in the
remote player either.
According to the documentation it should attempt to
fallback on another sound. This commit will do that.

Change-Id: I0216d61ca874eef0f168ad4d5bfb07491e01e654
2012-11-16 14:22:14 +01:00
Andreas Huber
35de48317f am d1e8f467: am 99a86d06: Clarify that MediaFormat.KEY_IS_ADTS only applies to decoding AAC audio content
* commit 'd1e8f467602307090f36a899b47f5088d0bc0201':
  Clarify that MediaFormat.KEY_IS_ADTS only applies to decoding AAC audio content
2012-11-14 10:24:24 -08:00
Andreas Huber
99a86d0633 Clarify that MediaFormat.KEY_IS_ADTS only applies to decoding AAC audio content
and cannot be used to configure the _encoder_ to emit ADTS content.

Change-Id: I47177099b204027b726b2c7ec9b93be6835d88f6
related-to-bug: 7542186
2012-11-14 09:16:59 -08:00
Craig Mautner
50acd73173 am 67a3fb6f: am c10914ca: Merge "Support Wifi display devices that rename themselves." into jb-mr1.1-dev
* commit '67a3fb6f3b787f0151c7f76f0c19dd1c8b80ae4e':
  Support Wifi display devices that rename themselves.
2012-11-13 10:04:27 -08:00
Craig Mautner
c10914ca5c Merge "Support Wifi display devices that rename themselves." into jb-mr1.1-dev 2012-11-13 10:00:04 -08:00
Eric Laurent
91d5cc56d3 am 2b988843: am 30717b68: Merge "AudioService: undock audio glitch - DO NOT MERGE" into jb-mr1.1-dev
* commit '2b9888439d4016ac4890b0c6018d2f5a9e5bd653':
  AudioService: undock audio glitch - DO NOT MERGE
2012-11-08 15:45:27 -08:00
Eric Laurent
8a8e2a4b9c am 98e5c814: am 73176865: Merge "audio service fix dock after crash - DO NOT MERGE" into jb-mr1.1-dev
* commit '98e5c81438f36d907215eeba338ee834c29791de':
  audio service fix dock after crash - DO NOT MERGE
2012-11-08 15:45:23 -08:00
Eric Laurent
0214f2b856 AudioService: undock audio glitch - DO NOT MERGE
merge from master:

"AudioService: improve low end dock audio control

Low end docks have a menu to enable use of audio
for media: automatically enabling/disabling use of audio
when the dock is connected/disconnected is useless
and can be the source of audio glitches.

Bug 7463620."

Change-Id: I3b7e7ebe660bb3f0e4367d2a3ed63ee76f78fe58
2012-11-08 09:17:56 -08:00
Eric Laurent
cd3231f501 audio service fix dock after crash - DO NOT MERGE
merge from master:
"audio service: set dock use on mediaserver restart

Restore forced usage of dock audio for media according to
current setting when media server restarts."

Bug 7485250.

Change-Id: Ie67b80ede1ed92d223dd96de83c1beb985dfba06
2012-11-08 09:05:22 -08:00
Jeff Brown
74da109102 Support Wifi display devices that rename themselves.
Some Wifi display devices like to rename themselves after a
connection completes (or at other times).  Make sure to update
the name of the display when we detect that it changed in
our scan results.

This problem is somewhat complicated by the fact that we remember
the display name persistently, so we need to update our list
of remembered displays too.

Improve the state machine to avoid redundant attempts to
disconnect or cancel connection.

Bug: 7478895
Change-Id: I35a9e2c6a8deadbe892dacd5e3b4a5a2b12d6cf0
2012-11-07 18:43:32 -08:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Kenny Root
3a084af2e9 Correct executable bit for source files
Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
2012-11-07 10:27:31 -08:00
Marco Nelissen
6791ebde5f am 7a4d856c: Merge "Removed offensive music genre"
* commit '7a4d856c881ef48ad590d9e5a0456c94d188898a':
  Removed offensive music genre
2012-11-05 15:41:31 -08:00
Marco Nelissen
7a4d856c88 Merge "Removed offensive music genre" 2012-11-05 14:50:09 -08:00
Eric Laurent
61ebf9cd8f Merge "audio service: make dock audio is off by default" into jb-mr1-dev 2012-10-29 15:21:33 -07:00
Jean-Michel Trivi
f4a8eb2211 No playback and music widget from other user on user switch
On user switch:
 - make the current audio focus owner loose audio focus
 - clear the remote control display

Bug 7205290
Bug 7307156

Change-Id: I6ebcb94d1d2bae8c57ab98dd7e795b239a981d28
2012-10-29 12:42:55 -07:00
Eric Laurent
5ba0ffa023 audio service: make dock audio is off by default
It is better to turn dock audio off by default if the user
has not yet explicitly turned it on from the settings menu.
There is a discoverability issue with current implementation
as we do not launch the settings menu at first dock insertion.
Having audio routed to the dock by default would make the tablet
silent for media content when docked and users will not be directed
to the settings menu.

As the dock audio enable setting is for low end docks only
(analog connection and no jack detection) disabling audio for low end docks
by default does not impact manta and prime docks.

Bug 7302106.

Change-Id: I571f361d41940cfb811f038442ae9ba9c6361d1d
2012-10-29 12:31:09 -07:00
Eric Laurent
c99a1107c0 Merge "add settings for dock audio enabled" into jb-mr1-dev 2012-10-27 14:42:18 -07:00
Eric Laurent
7ee1e4ff73 add settings for dock audio enabled
Add settings dock_audio_media_enabled indicating if dock audio
is enabled for media for docks that do not implement jack detection.

Bug 7302106.

Change-Id: I75766b606ceb870b3f89979c4e3cca88ed197aaf
2012-10-26 18:11:21 -07:00
Jeff Brown
92130f6407 Add MediaRouter API to get presentation display.
This new API makes it possible for an application to ask on
which Display it should show a Presentation based on the currently
selected media route.

Also added a new API on DisplayManager to query displays that
support a certain category of uses.

Improved the documentation of the Presentation class to explain
how to choose an appropriate Display for presentation.

Bug: 7409073
Change-Id: Iab451215e570ae55f3718fc228303143c800fe51
2012-10-25 20:31:21 -07:00
Bryan Mawhinney
33c0a616db Merge "Add text representation of ROUTE_TYPE_LIVE_VIDEO (for debugging)" into jb-mr1-dev 2012-10-25 02:06:37 -07:00
Bryan Mawhinney
2bb7c122ef Add text representation of ROUTE_TYPE_LIVE_VIDEO (for debugging)
Change-Id: Id8fa45aefde85e2ba2b57694b91485ef25e2e5f2
2012-10-24 13:59:33 +01:00
Eric Laurent
d799db406b AudioService: add fix for corrupted settings
Added correction of MODE_RINGER_STREAMS_AFFECTED setting in
case it is inconsistent when read from the database: ringtone,
notification and system streams are always affected by ringer mode.
A corruption of this setting persists accross reboots and propagates via
backup/restore causing devices to play notification and ringtones in silent mode.

Bug 7384750.

Change-Id: I23170413d01e6a8e34ef514f1516d7b9ab8bc656
2012-10-23 20:14:27 -07:00
Jeff Sharkey
8d9a1f66d9 More migration to Global settings.
Bug: 7375796
Change-Id: I3954ce141ad30073896090a28eee743ba15fd736
2012-10-18 15:38:14 -07:00
Jean-Michel Trivi
256ab9e9b9 Merge "Use device availability to start WFD audio routing" into jb-mr1-dev 2012-10-15 16:24:56 -07:00
Marco Nelissen
39ca39b026 Rewind buffer before copying into it.
b/7334897

Change-Id: I83f795cb662d0845314bfb80b9a27ae45b2a0517
2012-10-12 11:13:10 -07:00
Jean-Michel Trivi
c203ecfd9f Use device availability to start WFD audio routing
Don't use the force_use mechanism to start WFD audio routing,
 but rather only the availability of the remote submix audio
 device. This is matched by a change in the audio policy
 manager.

Bug 7318180

Change-Id: I756f032d8ca0375c3dbeddb7c321261c497539bc
2012-10-11 18:30:11 -07:00
Jeff Brown
2444ae7e2b Ensure MediaRouter correctly handles renamed Wifi displays.
Fix a couple of bugs that cause MediaRouter to disconnect from
the current Wifi display whenever it is renamed.

Added an extra check in WifiDisplayAdapter for identity renames.
The Settings app already handles this case but it's good to have
the service check for it as well so we don't store unnecessary
aliases.

Bug: 7310777
Change-Id: I8fddd32ca59f9b798ee31b467b81457508c345f8
2012-10-11 14:30:21 -07:00
Jean-Michel Trivi
bcfc1ca8ab Merge "Don't play notifications during speech recognition" into jb-mr1-dev 2012-10-10 16:30:56 -07:00
Adam Powell
3f369684e1 Fix MediaRouter prioritization around a2dp devices
Most recently connected audio output gets priority. Wifi display will
dominate over everything.

Bug 7324334

Change-Id: I29b59570a2e9b5352be436dc5b7a0a6861dfae6b
2012-10-10 15:39:59 -07:00
Jean-Michel Trivi
d677054ca6 Don't play notifications during speech recognition
Add support for querying AudioManager to know whether speech
 recognition is currently underway.

Don't play a notification if speech recognition is underway.

Bug 7314859

Change-Id: I1bd013a3168cfe1a6b6dcfd28565e1c3c512eb6a
2012-10-10 12:03:41 -07:00
Eric Laurent
14dfe4e0ab Merge "enforce camera sound according to country code" into jb-mr1-dev 2012-10-09 11:29:11 -07:00
Adam Powell
b072a9686c Don't do a wifi p2p scan in MediaRouter if we're already connected
When we're connected to a wifi display already, some configurations
might hiccup or otherwise disrupt the media stream if we initiate a
new scan. Block the MediaRouter's default scanning behavior if we
start up while already connected to a wifi display. (A scan will still
occur if the user opens the picker dialog.)

Change-Id: I413efa883eec41fe0377da18bcb55bc72e2ac729
2012-10-08 20:56:35 -07:00
Eric Laurent
dd45d01128 enforce camera sound according to country code
Use mcc config overlay mechanism to enforce camera shutter sounds
in countries where it is mandatory.
Property ro.camera.sound.forced is not needed anymore.
When camera sound is forced, STREAM_SYSTEM_ENFORCED is removed from
streams affected by ringer mode and its volume is
maxed out. AudioSystem.FORCE_SYSTEM_ENFORCED is sent to audio
policy manager to alter the routing policy for STREAM_SYSTEM_ENFORCED.

Also fix streams being unmuted when settings are reloaded
upon user switch while in silent mode.

Add ringer mode to audio service dump.

Bug 7032634.

Change-Id: Iceea5bba3b8d3aabf8e42b222deb33a893dc8f38
2012-10-08 17:00:02 -07:00
Eric Laurent
33902db750 AudioService: fix settings for fixed volume device
Force max volume for devices with fixed volume policy (HDMI, dock...)
when reading the settings from DB. Otherwise, these devices would
get the default volume which is not what we want.

Also fix a problem related to ringer mode management when reloading the
volume settings upon user switch that would cause a muted stream to be
unmuted.

Bug 7301563;

Change-Id: I81cdb97125b845da584ed680181b93c7c1e5903f
2012-10-07 16:54:47 -07:00
Adam Powell
11b999d0aa MediaRouter/Wireless Display - correct initial state
Make sure we get the right initial status for wifi displays when a new
display route is first added to the MediaRouter.

Bug 7289746

Change-Id: Id41f704fc88021bd4cdf21e9f4b3c810775e1aea
2012-10-04 16:28:53 -07:00
Eric Laurent
31fed73701 Merge "AudioService: filter flags in volume methods" into jb-mr1-dev 2012-10-04 08:44:26 -07:00
Eric Laurent
799448bee1 AudioService: filter flags in volume methods
Strip FIXED_VOLUME flag in setStreamVolume() and
adjustStreamVolume() as this flag is reserved for
framework use.

Bug 4335692.

Change-Id: I507582270f4c4cd631ee81fe50dca895bb6352b3
2012-10-03 10:17:10 -07:00
Eric Laurent
002e9d382d audio service: fix system volume settings
STREAM_SYSTEM stream volume is never persisted to settings as
it is always derived from another stream volume (STREAM_RING on phones
and STREAM_MUSIC on tablets). Therefore values stored in settings
are stale from previous releases and should be ignored.

Also fix a problem where a muted stream can be unmuted by
readAudioSettings() even if it is muted by ringer mode.

Bug 7216630.

Change-Id: If23561ddfbc704f89fd0a997faf1b50299a50c2e
2012-10-02 11:46:30 -07:00
Eric Laurent
d640bd325c enable safe media volume according to country
Enable safe headphone volume feature for all countries that
do not opt otherwise in their mmc configuration.
Opt out for US.

Bug 7231029.

Change-Id: I2619d627508eb2cd1f73db9242e0cb5efa839a2a
2012-10-02 08:46:26 -07:00
Adam Powell
2ee6a2a832 MediaRouter/Wifi Display improvements
* Don't select the default route on initialization in a process

* Add "connecting" state to MediaRouteButton

Bug 7258981
Bug 7262522

Change-Id: I5cd39b09843783b7e1e17620ca33193f0f3b8fca
2012-10-01 14:05:32 -07:00
Adam Powell
4131a37366 String change for video routing via MediaRouter; "HDMI" not "HDMI audio."
Change-Id: Ifece0cf0bc11ff2ffab254c6177f9db741037df6
2012-09-28 12:52:34 -07:00
Adam Powell
705ab808cf Add wireless display selection support to MediaRouter.
* Adds the new route type LIVE_VIDEO

* Wireless displays support both LIVE_VIDEO and LIVE_AUDIO, making
  wireless display routes valid selections in when apps make selecting
  live audio routes available.

* MediaRouter will only report/manipulate wireless displays that have
  already been paired at the system level.

Bug 7177920

Change-Id: Ic221b8687d77b4c0df9801c396b74870e86206e9
2012-09-28 11:46:40 -07:00
Jeff Sharkey
1951db86f5 Merge "Multi-user ringtone playback." into jb-mr1-dev 2012-09-26 13:38:22 -07:00
Jeff Sharkey
65c4a2b26c Multi-user ringtone playback.
Change RingtonePlayer to open content:// Uris based on requesting
UserHandle.  Grant SystemUI visibility to all emulated storage so
it can play ringtones for apps without READ_EXTERNAL_STORAGE.

Resolve canonical file:// Uris before passing out of source app,
replacing any /emulated_legacy/-style paths with user-specific
variant so they can be opened by SystemUI.  Calling for RemoteViews,
Ringtones, and Notifications.

Bug: 7202982
Change-Id: Ibf0eca8df80c1486711144a7b648f464aadfe099
2012-09-26 10:49:35 -07:00
Glenn Kasten
c6c4365ddb Implement android.media.AudioManager.getProperty()
Bug: 6635041
Change-Id: I0e7d53b99559cdc89f2f107f23048e4b1a8dd383
2012-09-25 17:01:40 -07:00
Eric Laurent
4bbcc65497 Display a fixed volume silder when docked.
Align UI indication to volume policy when docked: the music volume
cannot be adjusted when docked or connected to HDMI. Display
a disabled slider at max volume in this case to be consistent.

Bug 4335692.

Change-Id: I6f8db143b0e2ecf54e4bdacd88afdeb661a98a18
2012-09-25 10:28:05 -07:00
Jean-Baptiste Queru
bf2e088b00 Merge into jb-mr1-dev
Change-Id: Iba23d16643b8754f6e0a7288b2ca242f722f1bdd
2012-09-25 09:42:57 -07:00
Eric Laurent
5bfaeaef3f pause music playback when switching user.
AudioService sends AudioManager.ACTION_AUDIO_BECOMING_NOISY
intent when notified of a user switch to pause music playback
for all background users.

Bug 7128886.

Change-Id: I6a24409533bf40c517c43da25b9baeceb3379cb8
2012-09-21 18:44:48 -07:00