audio policy: fix stream to volume source mapping

remove use of obsolete method streamToVolumeSource()
and replace it by toVolumeSource() which actually queries
the engine for stream to volume source mapping.

Bug: 129439600
Test: make

Change-Id: Ie4e4e93aa5925315078fa96a957bb3ed71e7dc76
diff --git a/services/audiopolicy/engineconfigurable/src/Engine.cpp b/services/audiopolicy/engineconfigurable/src/Engine.cpp
index e59d983..cb45fcf 100644
--- a/services/audiopolicy/engineconfigurable/src/Engine.cpp
+++ b/services/audiopolicy/engineconfigurable/src/Engine.cpp
@@ -224,16 +224,16 @@
     audio_devices_t devices = AUDIO_DEVICE_NONE;
     if (ps == getProductStrategyForStream(AUDIO_STREAM_NOTIFICATION) &&
             !is_state_in_call(getPhoneState()) &&
-            !outputs.isActiveRemotely(streamToVolumeSource(AUDIO_STREAM_MUSIC),
+            !outputs.isActiveRemotely(toVolumeSource(AUDIO_STREAM_MUSIC),
                                       SONIFICATION_RESPECTFUL_AFTER_MUSIC_DELAY) &&
-            outputs.isActive(streamToVolumeSource(AUDIO_STREAM_MUSIC),
+            outputs.isActive(toVolumeSource(AUDIO_STREAM_MUSIC),
                              SONIFICATION_RESPECTFUL_AFTER_MUSIC_DELAY)) {
         product_strategy_t strategyForMedia =
                 getProductStrategyForStream(AUDIO_STREAM_MUSIC);
         devices = productStrategies.getDeviceTypesForProductStrategy(strategyForMedia);
     } else if (ps == getProductStrategyForStream(AUDIO_STREAM_ACCESSIBILITY) &&
-        (outputs.isActive(streamToVolumeSource(AUDIO_STREAM_RING)) ||
-         outputs.isActive(streamToVolumeSource(AUDIO_STREAM_ALARM)))) {
+        (outputs.isActive(toVolumeSource(AUDIO_STREAM_RING)) ||
+         outputs.isActive(toVolumeSource(AUDIO_STREAM_ALARM)))) {
             // do not route accessibility prompts to a digital output currently configured with a
             // compressed format as they would likely not be mixed and dropped.
             // Device For Sonification conf file has HDMI, SPDIF and HDMI ARC unreacheable.