Default music volume is changed from 3/4 of max to 1/3 of max to
reduce initial volume over headphones percieved as too agressive.
Also add a property ro.config.media_vol_default to modify this
default value.
Bug: 62608451
Test: verify default music volume over headphones after factory reset.
Change-Id: Icadb99e1bafe88984d3a3a05014d4d4648830693
This is becoming a common pattern (keeping track of which processes
are cached and not allowing them to do stuff in that state), so I
am turning this in to a general mechanism for monitoring this state
through the activity manager's IUidObserver. Now we can just have
AudoService implement its own IUidObserver to get this state and
update which uids it is blocking.
This required making some changes to uid change reports so that
the integer is now a bit mask instead of an enumerations, but that
is what it was already turning in to anyway. (This gets rid of
the crazy GONE_IDLE constant that we'd needed to add before because
it wasn't a bit mask).
Eventually the power manager should be changed to be told about
these changes to cached state instead of listening to every proc
state change, but we'll do that later, it is more disruption than
I want to take for now. However, while working on this, I noticed
that the power manager had regressed in the cached uids it would
actually block, because the activity manager was no longer telling
it about all uids that are idle. (I think this happened when I had
to change the default idle state of UidRecord to true.) So I am
adding a bit of new code to keep track of what idle state we last
reported to observers, to make sure we tell it about newly created
uids that are idle but have never actually become active.
Test: runtest -c com.android.server.am.ActivityManagerServiceTest frameworks-services
Change-Id: I7bfd46bacadd4cab2a69f40e6e52afb4e67b456a
Make it clear that setAudioPolicyFocusListener is required when external
focus control is desired (as opposed to previously mentioned
setAudioPolicyStatusListener).
Test: Inspection of the code.
Change-Id: I6d933feb3bf998d10a10b58ec6804dbab34e2036
Internal API, available through AudioManagerInternal, to flag
a UID as having lost the ability to play audio. When that
happens, all players associated with this UID are paused, and
future players are immediately paused when they report they
started.
Users of this API must "enable" a previously banned UID when
it is no longer in use.
Test: upcoming manual test with background apps
Bug: 34471029
Change-Id: Ic1c103aabe8f3897072b3ce938d84cb949540e23
Bug: 36220140
Test: verify AUDIO_BECOMING_NOISY intent is broacast when a USB_HEADSET
device is disconnected.
Change-Id: I6bfafc0174d5a02cc64862074f60e073407337d3
Do not suppress VoIP audio in any DnD mode.
Test: start a VoIP app and enter Total Silence mode, verify comm audio is still heard.
Bug: 37742663
Change-Id: I40de67b45713f476a2e07b05ac84bd6663f50fdf
Race conditions may happen between
MediaSessionManager.SessionsChangedWrapper.release() and calling
onActiveSessionsChanged(), which might cause NPE. Copies member
variables as local variables to prevent that.
Test: cts-tradefed run cts -m MediaTest
Bug: 62841633
Change-Id: I69b6d155a1a5c475ab4bb317b60baa6f3a030e5a
Limitation: When two apps make sound simultaneously while one uses a BT
route and the other uses the default route, switching activities between
the two different apps will not change the BT A2DP status until one of
the apps changes its playback status to inactive.
Bug: 32958908, Bug: 35567695, Bug: 33186346
Test: Passed MediaRouter/MediaSession test, and manually varified that
the b/33186346 is fixed.
Change-Id: I1da97dcb74fa2095425b311ad62cdd00f8118cea
Add support for a system component to listen to recording activity
and know the uid and package name of the client app performing
the recording. This information is discarded for non-system
listeners on the server side.
Add log friendly dump for RecordActivityMonitor, AudioFormat and
audio source to dump recording activity in AudioService.
Test: run cts -m CtsMediaTestCases -t android.media.cts.AudioRecordingConfigurationTest#testAudioManagerGetActiveRecordConfigurations
Test: during recording, run "adb shell dumpsys audio", check output under RecordActivityMonitor
Bug 62579636
Change-Id: I60a223da3a2b7f7080bd7346fe3edc1df039466a
When entering Total silence mode, text prompts from a11y were losing
AppOpsManager.OP_PLAY_AUDIO, causing them to play muted (amplification
of 0.0f) even though the STREAM_ACCESSIBILITY volume was not.
The fix consists in adding another category of sound suppression
behavior in AudioAttributes, for usage types that should never be
suppressed (== muted), and using it for USAGE_ACCESSIBILITY.
When ZenModeHelper iterates over usages to mute/unmute players,
consider whether that usage's suppression behavior is SUPPRESSIBLE_NEVER.
Test: turn Talkback on, then enter Total silence and verify Talkback is heard
Bug 62827456
Change-Id: I48cae48797ef9bc6bcaee82484ba078ee445345c
Although the DATETIME and DATETIME_ORIGINAL tags are for different
purposes, the DATETIME value is set to the same value as
DATETIME_ORIGINAL tag's when loading the attributes of an image.
This CL prevents the problem by setting the value of DATETIME tag only
when it does not exist.
Bug: 62137632
Test: Passed ExifInterface CTS
Change-Id: Ic5c43c53cb363a782bcac20915d74ea534ec70e4
AV sync header was 16 bytes, which will cause partial timestamp header
written when the framesize cannot be divided by 16.
Bug: 31688925
Test: Test with writing fake data to AudioTrack with timestamp
Change-Id: Idc818985b3e0de47665ce5a28c458c018aa69eb3
Also fix MediaRoute update for USB devices
Bug: 62492975
Test: check warning with USB headset and property audio.safemedia.force.
Change-Id: If947beaf81b74b1e560402648042047cb23f1df6