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

Commit 81338ca4 authored by Brad Ebinger's avatar Brad Ebinger Committed by Gerrit Code Review
Browse files

Merge "Fix conference call cannot be hung up"

parents 465700de 1282f0f2
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -47,6 +47,18 @@ public abstract class Call {
        }
    }

    public enum HoldingRequestState {
        NONE, STARTED, ENDED;

        public boolean isStarted() {
            return this == STARTED;
        }

        public boolean isFinished() {
            return this == ENDED;
        }
    }

    public static State
    stateFromDCState (DriverCall.State dcState) {
        switch (dcState) {
@@ -70,6 +82,8 @@ public abstract class Call {

    public ArrayList<Connection> mConnections = new ArrayList<Connection>();

    public HoldingRequestState mHoldingRequestState = HoldingRequestState.NONE;

    /* Instance Methods */

    /** Do not modify the List result!!! This list is not yours to keep
@@ -277,4 +291,8 @@ public abstract class Call {
    protected void setState(State newState) {
        mState = newState;
    }

    public void updateHoldingRequestState(HoldingRequestState state) {
        mHoldingRequestState = state;
    }
}
+4 −1
Original line number Diff line number Diff line
@@ -118,6 +118,9 @@ public class GsmCdmaCall extends Call {
        newState = stateFromDCState(dc.state);

        if (newState != mState) {
            if (mState == State.HOLDING) {
                updateHoldingRequestState(HoldingRequestState.ENDED);
            }
            mState = newState;
            changed = true;
        }
+6 −0
Original line number Diff line number Diff line
@@ -1260,6 +1260,12 @@ public class GsmCdmaCallTracker extends CallTracker {
                // Do not auto-answer ringing on CHUP, instead just end active calls
                log("hangup all conns in active/background call, without affecting ringing call");
                hangupAllConnections(call);
            } else if (call.mHoldingRequestState.isStarted()) {
                // Even if the progress of holding is not completed, lower layer expects to hang up
                // as background call because of being going to holding.
                log("hangup waiting or background call");
                logHangupEvent(call);
                hangupWaitingOrBackground();
            } else {
                logHangupEvent(call);
                hangupForegroundResumeBackground();