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

Commit b1dca75b authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-merger
Browse files

Merge "Add onDisconnect callback in root radio connection class." am: d76d0e11 am: 990d69a3

am: 52a4138b

Change-Id: I07cf3d6161da21a630123649eff393c8baac999f
parents 19164572 52a4138b
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ public abstract class Connection {
        public void onConnectionEvent(String event, Bundle extras);
        public void onRttModifyRequestReceived();
        public void onRttModifyResponseReceived(int status);
        public void onDisconnect(int cause);
    }

    /**
@@ -143,6 +144,8 @@ public abstract class Connection {
        public void onRttModifyRequestReceived() {}
        @Override
        public void onRttModifyResponseReceived(int status) {}
        @Override
        public void onDisconnect(int cause) {}
    }

    public static final int AUDIO_QUALITY_STANDARD = 1;
@@ -1054,6 +1057,18 @@ public abstract class Connection {
        }
    }

    /**
     * Notify interested parties that this connection disconnected.
     * {@code TelephonyConnection}, for example, uses this.
     * @param reason the disconnect code, per {@link DisconnectCause}.
     */
    protected void notifyDisconnect(int reason) {
        Rlog.i(TAG, "notifyDisconnect: callId=" + getTelecomCallId() + ", reason=" + reason);
        for (Listener l : mListeners) {
            l.onDisconnect(reason);
        }
    }

    /**
     *
     */
+1 −0
Original line number Diff line number Diff line
@@ -583,6 +583,7 @@ public class GsmCdmaConnection extends Connection {
            if (DBG) Rlog.d(LOG_TAG, "onDisconnect: cause=" + cause);

            mOwner.getPhone().notifyDisconnect(this);
            notifyDisconnect(cause);

            if (mParent != null) {
                changed = mParent.connectionDisconnected(this);
+1 −0
Original line number Diff line number Diff line
@@ -428,6 +428,7 @@ public class ImsPhoneConnection extends Connection implements
            mDisconnected = true;

            mOwner.mPhone.notifyDisconnect(this);
            notifyDisconnect(mCause);

            if (mParent != null) {
                changed = mParent.connectionDisconnected(this);