CSD: return interface for messages to audio server
Whenever the AudioService registers for receiving sound dose callbacks from the
native side, the native sends back the ISoundDose interface.
Test: logs, dumpsys and UT
Bug: 257238734
Change-Id: I5605196e8be91f00a7fbcf65573dfabe6e5c03d3
diff --git a/media/libaudioclient/IAudioFlinger.cpp b/media/libaudioclient/IAudioFlinger.cpp
index 97b61a5..e6d84ad 100644
--- a/media/libaudioclient/IAudioFlinger.cpp
+++ b/media/libaudioclient/IAudioFlinger.cpp
@@ -837,9 +837,10 @@
return NO_ERROR;
}
-status_t AudioFlingerClientAdapter::registerSoundDoseCallback(
- const sp<media::ISoundDoseCallback> &callback) {
- return statusTFromBinderStatus(mDelegate->registerSoundDoseCallback(callback));
+status_t AudioFlingerClientAdapter::getSoundDoseInterface(
+ const sp<media::ISoundDoseCallback> &callback,
+ sp<media::ISoundDose>* soundDose) {
+ return statusTFromBinderStatus(mDelegate->getSoundDoseInterface(callback, soundDose));
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1360,10 +1361,11 @@
return Status::ok();
}
-Status AudioFlingerServerAdapter::registerSoundDoseCallback(
- const sp<media::ISoundDoseCallback>& callback)
+Status AudioFlingerServerAdapter::getSoundDoseInterface(
+ const sp<media::ISoundDoseCallback>& callback,
+ sp<media::ISoundDose>* soundDose)
{
- return Status::fromStatusT(mDelegate->registerSoundDoseCallback(callback));
+ return Status::fromStatusT(mDelegate->getSoundDoseInterface(callback, soundDose));
}
} // namespace android