CSD: forward the native MEL exposure to AudioService
Added new aidl interface for the communication between the
SoundDoseManager and the SoundDoseHelper. Currently only the momentary
exposure warning is reported.
Test: manual
Bug: 257238734
Change-Id: I61560f81fedd31c30c39d676b7adf0ce087b495c
diff --git a/media/libaudioclient/AudioSystem.cpp b/media/libaudioclient/AudioSystem.cpp
index af00ab1..fa9239f 100644
--- a/media/libaudioclient/AudioSystem.cpp
+++ b/media/libaudioclient/AudioSystem.cpp
@@ -2374,6 +2374,15 @@
return OK;
}
+status_t AudioSystem::registerSoundDoseCallback(const sp<media::ISoundDoseCallback>& callback) {
+ const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
+ if (af == nullptr) {
+ return PERMISSION_DENIED;
+ }
+
+ return af->registerSoundDoseCallback(callback);
+}
+
status_t AudioSystem::getDirectPlaybackSupport(const audio_attributes_t *attr,
const audio_config_t *config,
audio_direct_mode_t* directMode) {