hal: Fix for no audio on BT headset till waiting call is ended.
-Issue: Voice call audio is not routing to BT headset
though connected, till the waiting call is ended.
-Rootcause: During voice call, if another call is received, the
audio mode is changed to MODE_RINGTONE. Due to this, the primary
output on which the voice call is setup, is not able to find
new device as BT in getNewdevice().
-Fix: Avoid mode change to MODE_RINGTONE when voice call is already
active.
Change-Id: I38582e2500ff4c44eb5ac45dab3aab35606d1c7d
CRs-Fixed: 662883
diff --git a/policy_hal/AudioPolicyManager.h b/policy_hal/AudioPolicyManager.h
index dce5bad..ab57768 100644
--- a/policy_hal/AudioPolicyManager.h
+++ b/policy_hal/AudioPolicyManager.h
@@ -61,6 +61,9 @@
virtual bool isOffloadSupported(const audio_offload_info_t& offloadInfo);
virtual void setPhoneState(int state);
+
+ // true if given state represents a device in a telephony or VoIP call
+ virtual bool isStateInCall(int state);
protected:
// return the strategy corresponding to a given stream type
static routing_strategy getStrategy(AudioSystem::stream_type stream);