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/services/audioflinger/sounddose/SoundDoseManager.h b/services/audioflinger/sounddose/SoundDoseManager.h
index 5934d2e..754b569 100644
--- a/services/audioflinger/sounddose/SoundDoseManager.h
+++ b/services/audioflinger/sounddose/SoundDoseManager.h
@@ -17,6 +17,7 @@
 
 #pragma once
 
+#include <android/media/ISoundDoseCallback.h>
 #include <audio_utils/MelProcessor.h>
 #include <audio_utils/MelAggregator.h>
 #include <mutex>
@@ -71,6 +72,9 @@
 
     std::string dump() const;
 
+    /** \brief Registers the interface for passing callbacks to the AudioService. */
+    void registerSoundDoseCallback(const sp<media::ISoundDoseCallback>& callback);
+
     // used for testing
     size_t getCachedMelRecordsSize() const;
 
@@ -91,6 +95,8 @@
                        wp<audio_utils::MelProcessor>> mActiveProcessors GUARDED_BY(mLock);
 
     float mRs2Value GUARDED_BY(mLock);
+
+    sp<media::ISoundDoseCallback> mSoundDoseCallback GUARDED_BY(mLock);
 };
 
 }  // namespace android