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

Commit ad758ec6 authored by Garik Badalyan's avatar Garik Badalyan Committed by Linux Build Service Account
Browse files

IMS-VT: Don't send resume request when call changes.

When primary call changes VideoPauseController
triggers video resume request which fails since
the call was not paused before. This results in
displaying error notification on InCallUI.

Note that it is possible that video was paused
by remote UE so local UE shall not attempt to
resume the video by relying on the pause flag
only.

Change-Id: Id1d6411c6994312fe0019bf8da82262a50604633
parent 6610869a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -194,11 +194,10 @@ class VideoPauseController implements InCallStateListener, IncomingCallListener
        Preconditions.checkState(!areSame(call, mPrimaryCallContext));
        final boolean canVideoPause = VideoUtils.canVideoPause(call);

        if ((isIncomingCall(mPrimaryCallContext) || isDialing(mPrimaryCallContext) ||
                (call != null && VideoProfile.isPaused(call.getVideoState())))
        if ((isIncomingCall(mPrimaryCallContext) || isDialing(mPrimaryCallContext))
                && canVideoPause && !mIsInBackground) {
            // Send resume request for the active call, if user rejects incoming call, ends dialing
            // call, or the call was previously in a paused state and UI is in the foreground.
            // call and UI is in the foreground.
            sendRequest(call, true);
        } else if (isIncomingCall(call) && canVideoPause(mPrimaryCallContext)) {
            // Send pause request if there is an active video call, and we just received a new