Audio Policy Engine: fix in call routing (and other)

Routing rules for a given strategy can be adapted depending on the
context (e.g when in call or not) in order to make sure that concurrent
use cases do not use conflicting routes and that the highest priority
strategy prevails.

This strategy "remapping" must be done before we check possible
overrides of default routing for a given strategy by
setDevicesRoleForStrategy().

Commit cca11ce4 did partially address this but some cases were left aside.
This commit generalizes the behavior and moves all the strategy
remappings out of getDevicesForStrategyInt()

Bug: 183380877
Test: audio smoke tests
Change-Id: Ia272dd28ffd39441b62c9a262c38bf47dc44e7f0
diff --git a/services/audiopolicy/enginedefault/src/Engine.h b/services/audiopolicy/enginedefault/src/Engine.h
index 6dc6cd0..98f59d3 100644
--- a/services/audiopolicy/enginedefault/src/Engine.h
+++ b/services/audiopolicy/enginedefault/src/Engine.h
@@ -76,12 +76,13 @@
 
     void filterOutputDevicesForStrategy(legacy_strategy strategy,
                                             DeviceVector& availableOutputDevices,
-                                            const DeviceVector availableInputDevices,
+                                            const SwAudioOutputCollection &outputs) const;
+
+    product_strategy_t remapStrategyFromContext(product_strategy_t strategy,
                                             const SwAudioOutputCollection &outputs) const;
 
     DeviceVector getDevicesForStrategyInt(legacy_strategy strategy,
                                           DeviceVector availableOutputDevices,
-                                          DeviceVector availableInputDevices,
                                           const SwAudioOutputCollection &outputs) const;
 
     DeviceVector getDevicesForProductStrategy(product_strategy_t strategy) const;