Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 212d538a authored by Pranav Madapurmath's avatar Pranav Madapurmath
Browse files

Ensure BT ICS unbind after completing BT future

This CL ensures that once the BT disconnected tone future is completed
that we unbind from the BT ICS immediately after. There were cases where
the disconnect tone doesn't play and the only place we perform the
unbinding is when the disconnect tone finishes in
InCallController#onDisconnectedTonePlaying. We should ensure that we
always unbind the BT ICS for all cases. Once we complete the future,
we for sure know that the call state is disconnected so we can safely
unbind at that point.

This CL also makes changes to the mPendingEndCallTone set being used.
I had added logic to skip the unbinding if the set is not empty but in
cases where we don't play the disconnect tone, the associated call is
never cleaned up from the set. Looking at this closer, I also realized
that in cases where the associated user of the calls are different, the
references to the ICS connections/info would never be cleaned up
properly. We should clean up the references if there are no more calls
of the same associated user. We should also skip the unbinding in the
case that the user used to bind to the BT ICS is the same even when the
associated users of any two calls are differnet. From my understanding,
we always bind to BT ICS as User 0 but it's better not to hardcode that
assumption into the implementation details.

Bug: 374933312
Test: Manual to verify that unbinding takes place in cases where we
don't play the disconnect tone.
Flag: EXEMPT bugfix

Change-Id: I49481a3dcd3bc0aa92f1d86ffc1de7a80a9e89c4
parent 6b2d00fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment