Add AudioPolicyServiceLocal interface
Audioflinger currently accesses AudioPolicyService through AudioSystem
which accesses the service through the binder interface.
To simplify, reduce maintenance, remove shim layers, etc., follow the
approach within SystemServer to pass a separate non-binder audiopolicy
interface, since the two run in the same process (and it is not feasible
to ever run them in different processes).
Eventually, we can remove AudioSystem as the intra-service method of
access, and remove all local-only calls from the AudioPolicyService
binder interface.
Test: Compiles
Bug: 338089555
Flag: EXEMPT safe change, adding interfaces
Change-Id: I920d8ba728347f056ce14d606248bba4466cb5eb
diff --git a/services/audiopolicy/service/AudioPolicyService.cpp b/services/audiopolicy/service/AudioPolicyService.cpp
index cd010ab..aa83946 100644
--- a/services/audiopolicy/service/AudioPolicyService.cpp
+++ b/services/audiopolicy/service/AudioPolicyService.cpp
@@ -316,6 +316,10 @@
AudioSystem::audioPolicyReady();
}
+const IPermissionProvider& AudioPolicyService::getPermissionProvider() const {
+ return *mPermissionController;
+}
+
void AudioPolicyService::onAudioSystemReady() {
sp<AudioPolicyEffects> audioPolicyEffects;
{