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

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

IMS-VT: Fix video remains paused issue.

Upon receiving a waiting call the video is put
on pause. However, video is not resumed when user
declines the waiting call which is incorrect.
This change ensures that video is resumed once
waiting call gets ended.

Change-Id: Iebc8a641082ec5312ab57050ebf865485851a4fd
CRs-Fixed: 1040855
parent 3384c584
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -381,7 +381,7 @@ class VideoPauseController implements InCallStateListener, IncomingCallListener,
     * @return {@code true} if the call is in incoming or waiting state, {@code false} otherwise.
     */
    private static boolean isIncomingCall(CallContext call) {
        return call != null && isIncomingCall(call.getCall());
        return call != null && isIncoming(call.getState());
    }

    /**
@@ -391,8 +391,17 @@ class VideoPauseController implements InCallStateListener, IncomingCallListener,
     * @return {@code true} if the call is in incoming or waiting state, {@code false} otherwise.
     */
    private static boolean isIncomingCall(Call call) {
        return call != null && (call.getState() == Call.State.CALL_WAITING
                || call.getState() == Call.State.INCOMING);
        return call != null && isIncoming(call.getState());
    }

    /**
     * Determines if a call state is incoming/waiting.
     *
     * @param state The call state
     * @return {@code true} if the state is incoming or waiting, {@code false} otherwise.
     */
    private static boolean isIncoming(int state) {
        return state == Call.State.CALL_WAITING || state == Call.State.INCOMING;
    }

    /**