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

Skip to content
Commit c125eeb7 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Fix concurrency issue related to new outgoing call broadcast.

Fixes arace condition seen with the new outgoing call broadcast.
The scenario occurs when an incoming call is handled by an app which
receives the NewOutgoingCallBroadcast.  That app cancels the call by
modifying the new outgoing callbroadcast.  Meanwhile, it places that
same call again, expecting that Telecom will reuse the same same.
HOWEVER, if the system delays passing of the new outgoing call broadcast
back to Telecom, the app will have placed a new outgoing call BEFORE
telecom is aware that the call was cancelled.

The consequence of this is that in CallsManager#startOutgoingCall, when
we first get the call to reuse, it will come back empty.  Meanwhile, by
the time we get into the various completable futures, the call WILL be
in the list of calls which can be reused.  Since the reusable call was
not found earlier on, we end up aborting the new outgoing call.

Test: wrote unit test to reproduce this scenario and modified code to fix
the test.
Fixes: 171324351

Change-Id: Ieda35ee4f729ad7bbfa87b43b7ef5d11de9f3dab
parent 612a2221
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