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

Skip to content
Commit f5a32e47 authored by Tony Mak's avatar Tony Mak
Browse files

Fix call is disconnected immediately after selecting a phone account

The problem is introduced after the getForegroundCall logic is moved
to CallAudioManager. Previously a call is
foreground call if it is not in NEW, DISCONNECTED, and ABORTED state.
However, now a call is a foreground call only if it is in active,
dialing, ringing and holding state.

Here is how does the bug happen:
0. Have multiple phone accounts
1. Place an outgoing call
2. Select the phone account (and so the call is in SELECT_PHONE_ACCOUNT
   state).
3. CallsManager.phoneAccountSelected -> makeRoomForOutgoingCall return
   there is no room for the call. It is wrong as the foreground call
   should be the same as the call that just selected phone account!

So there are two solutions:
1. Do we intend to have the new definition of a foreground call? I believe
   there are more things are broken if we have a new definition. I will
   fix it as well once I confirm about it.
2. What's this CL fixed is removing the callToSkip argument in
   getFirstCallWithState. As we are trying to find whether the call is
   foreground call, I think it is unnecessary to skip finding the call.

BUG=26907829

BUG=26907829

Change-Id: Idda92b7685c12ec4c7440f775f1aebb834566de8
parent e0081bd8
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