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

Commit 3ec98d3f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix abnormal state of GsmCdmaCall after hangup"

parents b8e1d9b5 e6b1c5b4
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ package com.android.internal.telephony;

import android.compat.annotation.UnsupportedAppUsage;

import com.android.internal.annotations.VisibleForTesting;

/**
 * {@hide}
 */
@@ -146,7 +148,11 @@ public class GsmCdmaCall extends Call {
     * Note that at this point, the hangup request has been dispatched to the radio
     * but no response has yet been received so update() has not yet been called
     */
    void onHangupLocal() {
    @VisibleForTesting
    public void onHangupLocal() {
        if (!mState.isAlive()) {
            return;
        }
        for (Connection conn : getConnections()) {
            ((GsmCdmaConnection) conn).onHangupLocal();
        }
+2 −0
Original line number Diff line number Diff line
@@ -121,6 +121,8 @@ public class GsmCdmaCallTest extends TelephonyTest {
        doReturn(Call.State.DISCONNECTED).when(mConnection2).getState();
        mCallUnderTest.connectionDisconnected(null);
        assertEquals(Call.State.DISCONNECTED, mCallUnderTest.getState());
        mCallUnderTest.onHangupLocal();
        assertEquals(Call.State.DISCONNECTED, mCallUnderTest.getState());
    }

}
 No newline at end of file