Audio policy: notify system_server of routing change
Callback into AudioPolicyClientInterface to notify of routing
update whenever output is re-evaluated.
Add native test to verify callback is invoked on device
(dis)connection and setForceUse.
Bug: 162448412
Test: atest AudioServiceHostTest#testPreferredDeviceRouting
Test: atest AudioServiceHostTest#testDevicesForAttributes
Test: atest audiopolicy_tests:AudioPolicyManagerTestDeviceConnection#RoutingUpdate
Change-Id: Ia1a985b996bf8f2f63e72c4110f62f65f9f42f21
diff --git a/services/audiopolicy/AudioPolicyInterface.h b/services/audiopolicy/AudioPolicyInterface.h
index f753836..9d5a0a0 100644
--- a/services/audiopolicy/AudioPolicyInterface.h
+++ b/services/audiopolicy/AudioPolicyInterface.h
@@ -439,6 +439,8 @@
audio_patch_handle_t patchHandle,
audio_source_t source) = 0;
+ virtual void onRoutingUpdated() = 0;
+
// Used to notify the sound trigger module that an audio capture is about to
// take place. This should typically result in any active recognition
// sessions to be preempted on modules that do not support sound trigger