audiopolicy: fix VoIP and system sound routing concurrency

On platforms with dedicated output profiles for VoIP, activity on
all output streams should be considered when use case priority is
evaluated while selecting current device on a given output stream.

For now, implement a simple rule taking only into account output streams
attached to the same audio HAL module and limited to voice call use
case.
This should be extended to all use cases with a refined rule
considering mutually exclusive devices (using same backend) as opposed
to all streams on the same audio HAL module.

Bug: 109640706
Test: repro steps in b/109640706
Change-Id: I2cea35911a6121980f128a3a3d694699364854eb
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.h b/services/audiopolicy/managerdefault/AudioPolicyManager.h
index b954714..48e0472 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.h
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.h
@@ -321,6 +321,10 @@
         bool isStrategyActive(const sp<AudioOutputDescriptor>& outputDesc, routing_strategy strategy,
                               uint32_t inPastMs = 0, nsecs_t sysTime = 0) const;
 
+        bool isStrategyActiveOnSameModule(const sp<AudioOutputDescriptor>& outputDesc,
+                                                  routing_strategy strategy, uint32_t inPastMs = 0,
+                                                  nsecs_t sysTime = 0) const;
+
         // change the route of the specified output. Returns the number of ms we have slept to
         // allow new routing to take effect in certain cases.
         virtual uint32_t setOutputDevice(const sp<AudioOutputDescriptor>& outputDesc,