This reverts commit 64b507b1cf.
Additionally, stop using delays as that can cause audioserver to crash
Change-Id: If77eef84d04039b79ea1390dc81f89e5f01f354f
* Use a script to swap check if we are in an A2DP phone call
* Use an app to check if we are in a VoIP or A2DP call and pass parameters accordingly
* Correctly route A2DP phone calls to the actual bluetooth device instead of earpiece and un-swap speaker and earpiece in VoIP calls
Change-Id: I1de8b2ed57b265b65cf619000e78e290c98e3d5c
Co-Authored-By: Ruchit <ruchitmarathe@gmail.com>
Simon1511: libsec-ril sets a prop (ril.dds.call.slotid) when in call with Sim1 or Sim2. Patch libsec-ril to make that prop vendor lable-able (vendor.calls.slotid). Then use that prop to check which Sim is currently in a call (0 for Sim1 and 1 for Sim2) and pass the arguments to audio HAL depending on that.
Note for later: Check whether passing [g_]call_state is really needed
Change-Id: I5a0dfd3b100287a2cf1ec3c156292487dc4da3d5