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

Commit e7a9201e authored by jsh's avatar jsh
Browse files

Add a DISCONNECTING call state.

This indicates to the UI that the hangup command has been received by the
Telephony layer and passed down to the RIL, but we have not yet been notified
of a successful DISCONNECT.

Addresses http://b/issue?id=1659876.
parent f2beab58
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -25,10 +25,10 @@ public abstract class Call {
    /* Enums */

    public enum State {
        IDLE, ACTIVE, HOLDING, DIALING, ALERTING, INCOMING, WAITING, DISCONNECTED;
        IDLE, ACTIVE, HOLDING, DIALING, ALERTING, INCOMING, WAITING, DISCONNECTED, DISCONNECTING;

        public boolean isAlive() {
            return !(this == IDLE || this == DISCONNECTED);
            return !(this == IDLE || this == DISCONNECTED || this == DISCONNECTING);
        }

        public boolean isRinging() {
+2 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import com.android.internal.telephony.CallStateException;
import com.android.internal.telephony.Connection;
import com.android.internal.telephony.DriverCall;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.Call.State;

/**
 * {@hide}
@@ -186,6 +187,7 @@ public final class CdmaCall extends Call {

            cn.onHangupLocal();
        }
        state = State.DISCONNECTING;
    }

    /**
+1 −0
Original line number Diff line number Diff line
@@ -761,6 +761,7 @@ public final class CdmaCallTracker extends CallTracker {
        }

        call.onHangupLocal();
        phone.notifyPreciseCallStateChanged();
    }

    /* package */
+1 −0
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ class GsmCall extends Call {

            cn.onHangupLocal();
        }
        state = State.DISCONNECTING;
    }

    /**
+1 −0
Original line number Diff line number Diff line
@@ -738,6 +738,7 @@ public final class GsmCallTracker extends CallTracker {
        }

        call.onHangupLocal();
        phone.notifyPreciseCallStateChanged();
    }

    /* package */