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

Commit e18eb6e4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix abnormal state of GsmCdmaCall after hangup" am: 3ec98d3f am:...

Merge "Fix abnormal state of GsmCdmaCall after hangup" am: 3ec98d3f am: ff564e8c am: 2190986c am: e9dd36c7

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1422750

Change-Id: I9c80701f9c2abce9e58a5fb410d2318db29abdce
parents 98648103 e9dd36c7
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