Make the list of keys in allowedKey to match the
statsd_handlers[] in iface_statsd.cpp for dumpsys
to display mediadrm and Widevine metrics.
Bug: 149246413
Test: adb shell dumpsys media.metrics | grep -i drm
Test: adb shell dumpsys media.metrics | grep -i widevine
Change-Id: I7811eb3a4228a906bb3dbc615ce42d1947082a07
This change fixes the CTS failure in AudioPlaybackCaptureTest caused
by ag/10111312 and ag/10111311.
It contains the following fixes/changes:
- Mix match for playback capture of USAGE_VOICE_COMMUNICATION now
also respects a new flag (AudioMix's mVoiceCommunicationCaptureAllowed)
which is set by AudioService only if the caller explicitly asked
to capture USAGE_VOICE_COMMUNICATION and have the
CAPTURE_VOICE_COMMUNICATION_OUTPUT.
- A permission check on the native side in case
mVoiceCommunicationCaptureAllowed is set.
- Code cleanup, mainly in AudioPolicy.h and AudioPolicy.cpp.
This change is accompanied by ag/10242955 on the Java side.
Bug: 148559127
Test: manual
Test: atest PlaybackCaptureTest (with the version prior to ag/10220852)
Test: atest com.google.android.gts.audio.AudioHostTest
Change-Id: I8ae6249f4da1de35e962c838d91f690eb906570e
In case of using Device Port Gain to control the volume, the logic
of setVolumeIndexForAttributes for device type check has been bypassed.
However, in case of unmuting, the volume will be applied to all streams
with requested device then will be set for AUDIO_DEVICE_OUT_DEFAULT_FOR_VOLUME
which is a convention used in case of no volume for device has been set
previously.
As this logic is bypassed, in case of HwGain, the final gain applied will
be the one for AUDIO_DEVICE_OUT_DEFAULT_FOR_VOLUME, which may be completely
different from the gain of current device.
This CL fixes this by factorizing the device check logic for both SW/HW gains.
Test: build & play music & Vol - until mute then volume +. No gap expected.
Change-Id: I24c57df84496e404c05c92f08f907131ef79cf3a
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
am skip reason: Change-Id Ib3fb2a1b7b5f3118bf16a3cc9d8e578fa0431645 with SHA-1 35f8c7c32a is in history
Change-Id: I4c32884d686cb991b8993e5a9266a1018c808cc6
am skip reason: Change-Id I0bb3b5ca1f13ba23351bcd658acf8d7f52555929 with SHA-1 39d1f3e01d is in history
Change-Id: Ia0eeb3f22084c21b32fad8ec939fc6b821c06fa0
am skip reason: Change-Id I15a14e4cf85e6c4bbf09db24bb33b4b9fb9cab54 with SHA-1 1602608c4c is in history
Change-Id: I82afe3fed9431269085b57f646063cbe24bd4365
* changes:
audio policy: different default config for system volumes
[AudioPolicy] fix volume regression
[AudioPolicy][Engine] Attributes of strategy not populated
When a volume curve is not found for a volume group
associated to a system strategy, use AUDIO_STREAM_PATCH
instead of AUDIO_STREAM_MUSIC as default config.
Bug:148588565
Test: play music and check volume
Change-Id: Ib3fb2a1b7b5f3118bf16a3cc9d8e578fa0431645
Merged-In: Ib3fb2a1b7b5f3118bf16a3cc9d8e578fa0431645
This CL fixes regression introduced in aosp/1213724
The regression happened when offloaded music is played, volume
is reduced, next song is requested then the volume is switching
to full scale.
It is linked to a "ghost volume source" without stream types that
is considered as a music stream before volume is set in AudioFlinger.
The music volume was overwritten by this volume source.
This CL fixes only the ghost volume source by preventing to add twice
the internal volumes sources linked to AUDIO_STREAM_PATCH and
AUDIO_STREAM_REROUTING.
The clean fix consists in aligning AudioFlinger on volume sources
rather than stream types.
Bug: 148588565
Test: plays offloaded music, reduce volume to min.
Then press next song.
No volume gap expected.
Change-Id: I0bb3b5ca1f13ba23351bcd658acf8d7f52555929
Merged-In: I0bb3b5ca1f13ba23351bcd658acf8d7f52555929
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
The assistant new stream CL has broken the strategies without
stream types. The attributes are not populated anymore preventing
to retrieve the volume group from attributes.
Bug: 136121584
Test: run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioProductStrategyTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioVolumeGroupTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioVolumeGroupChangeHandlerTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testPermissionsForVolumePerAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testGetAndValidateProductStrategies
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testGetAndValidateVolumeGroups
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testSetGetVolumePerAttributesWithInvalidAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testSetGetVolumePerAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testVolumeGroupCallback
Change-Id: I15a14e4cf85e6c4bbf09db24bb33b4b9fb9cab54
Merged-In: I15a14e4cf85e6c4bbf09db24bb33b4b9fb9cab54
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
Communicate current audio mode owner UID to native service
when changing audio mode via setPhoneState.
This will be used by call audio capture restriction rules.
Bug: 148368476
Test: manual phone call tests
Change-Id: Icf6f168bb431b5232f6127877c40789c0c537bde
Due to security constraints, platform profilers that do remote stack
unwinding need the target process' cooperation. This is implemented via
a bionic signal handler.
On debug builds, media extractor can end up being targeted by such
system-wide profiling, which can crash the process due to
seccomp/minijail (specifically, due to sendmsg that is used for sending
file descriptors over a unix socket).
Tested: synced updated binary to crosshatch-userdebug, confirmed that
sending signal 36 with si_val 1 doesn't crash mediaextractor.
Bug: 149328505
Change-Id: Idf34e08edf99a82c72146aebeb5e46e5cf5af2f3
Due to some reason, for example bad file, readAt header fails
in AACExtractor(...) and the variable mMeta is not initialized.
Then exception happens when to delete mMeta in ~AMRExtractor().
Bug: 142630125
Test: MTBF test and make sure
no assertion in AMediaFormat_delete(mMeta) of ~AACExtractor()
Change-Id: Ie04989f20170391961c8a6d12e1882262be18d7f
Instead of requiring the user to call NewGlobalRef/DeleteGlobalRef
for keeping the java object alive when creating an NDK view into it,
reference count the real native data instead, so that there's no need
to keep track of the Java object lifecycle.
- Switch CameraMetadataNative to use std::shared_ptr internally
- Switch ACameraMetadata to use std::shared_ptr internally
- Always copy data in the ACameraMetadata copy constructor
Test: New CTS tests pass, fail without this CL
Bug: 148972471
Change-Id: I40a0ccb8b40c7a89ee7d3a6f7bac7c9c88d709f1