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

Commit 92100f1c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Fix a race-condition that returns incorrect foreground call"

parents 9da8902b 7425449e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1575,7 +1575,8 @@ public class CallsManager extends Call.ListenerBase implements VideoProviderProx
                    break;
                }

                if (call.isAlive() || call.getState() == CallState.RINGING) {
                if ((call.isAlive() && call.getState() != CallState.ON_HOLD)
                     || call.getState() == CallState.RINGING) {
                    newForegroundCall = call;
                    // Don't break in case there's an active call that has priority.
                }
@@ -1602,7 +1603,8 @@ public class CallsManager extends Call.ListenerBase implements VideoProviderProx
                    break;
                }

                if (call.isAlive() || call.getState() == CallState.RINGING) {
                if ((call.isAlive() && call.getState() != CallState.ON_HOLD)
                     || call.getState() == CallState.RINGING) {
                    newForegroundCall = call;
                    // Don't break in case there's an active call that has priority.
                }