Terminate ICS (for BT) after the disconnect tone finishes playing.
Currently, the disconnect tone and ICS termination occur independently
so we run into a scenario where the disconnect tone never plays over BT
(but we can hear the tone from the device).
We can introduce a future to hold the connection until after the tone is
done playing. The future can be configured to complete with a timeout of
4s (to account for the longest tone - TONE_CONGESTION) as a fallback. We
can perform manual completion when we cleanup the tone player and in
cases where we decide not to start the tone in the first place.
This requires introducing the future into the framework as there is no
other valid point of entry in the packages side. When we disconnect a
call, InCallController#updateCall is invoked which ends up terminating
the connection with the service. We cannot delay the workflow at this
point since Dialer would need to be immediately informed when the call
is being disconnected.
Bug: 194979745
Test: Manual
Change-Id: I5de05bcc38939d7ff3a710e847d8f33845b33706
1 file changed