* commit '2644494a9841c1f842d790b60911699f09eb63d1':
MediaCodec: Allow getting the codec info directly
MediaCodec: Allow getting the chosen component name
AudioService relies on a valid mmc in order to enforce the headset
volume limitation or not. There is a timeout to enforce the limitation
if no mcc is configured after boot.
Until this timeout is reached or a valid SIM is detected the headset
volume is not limited.
This change makes that the last known volume limitation state (enforced or
not) is persisted so that next time we boot, last known state is applied until
a new mcc is configured if any. In most cases, the mcc does not change from one
boot to the next and we do the right thing. If teh mcc does change, the correct
policy will be enforced when the mcc is detected or after the timeout.
Also fix a bug where the volume panel was not displayed if the limitation mechanism
is triggered at the first press on VOL+ key.
Bug 7455275.
Change-Id: Id0f2996d893d38c6a14f4f9e4a0e9e3be17ef127
MediaRouter's policy so far has been around a single selected route,
but when route types are entirely orthogonal this should not be the
case. However we still don't want to get into a situation where we
have multiple, very different routes selected for different types at
the same time, we still want to have more of an element of
predictability.
Behavior of getSelectedRoute is now:
* If the selected route matches at least one type with the requested
type flags, it is still considered selected for that request.
* If the caller specifically requested the selected user route and the
currently selected route is not a user route, return null.
* If the requested type flags do not match any types with the selected
route, return the default system route.
Note that this is "any" behavior instead of "all" - this matches
existing usage of the method. We may consider adding an "all" variant
later on.
Bug 7588042
Change-Id: I3a79d8153ca6b882fd3ef6b9b1de8f538873dec2
Change 1f9196a8e5de9b004e61afabc70b18caf7cf9c7e introduced
an issue when trying to ignore audio focus entries in the
stack that don't use the music stream, or are for transient
audio focus gain, for remote control display updates.
The bug was that the audio focus stack traversal was not
starting from the top, as it should. It was using
the iterator order, which, in the case of a stack, starts
with the bottom-most entry.
The fix consists in traversing the stack from the top, i.e.
from the last element of the vector used to hold the stack
entries.
Bug 7311023
Change-Id: I0c1900dbf98599a621a420ab55531a3eee838fe5
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
This saves the caller from manually iterating through the
MediaCodecList for finding the right codec.
This adds new public API.
Change-Id: I8462f040573427542d86d1b957a5aef53dd55e8e
Currently, when the codec was opened by createDecoder/EncoderByType,
the caller does not know what codec actually was chosen, and
(for encoders) thus cannot know what color formats it supports.
This adds new public API.
Change-Id: Ie471f40f8104b37d27ced3dba5a54facc6504b1b
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
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
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
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
On user switch:
- make the current audio focus owner loose audio focus
- clear the remote control display
Bug 7205290
Bug 7307156
Change-Id: I6ebcb94d1d2bae8c57ab98dd7e795b239a981d28
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
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
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
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
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
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
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
the test, change it as optional. This is to avoid
the tool breakage will block the whole memory test sutie.
Change-Id: Ia7425531ca2151230d7fd98eb710f282e166b4f7