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

Commit bd77a125 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

GsmCdmaPhone: don't crash without calling

Bug: 355455324
Test: v2/telephonycomm/cts_telephony_tests
Flag: EXEMPT bugfix
Change-Id: I7be830fb9e1419a7d2bd1fe4c4a6270da06499ce
parent 3586d52d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1119,6 +1119,7 @@ public class GsmCdmaPhone extends Phone {

    @Override
    public GsmCdmaCall getForegroundCall() {
        if (!hasCalling()) return null;
        return mCT.mForegroundCall;
    }

@@ -1396,6 +1397,8 @@ public class GsmCdmaPhone extends Phone {

    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public boolean isInCall() {
        if (!hasCalling()) return false;

        GsmCdmaCall.State foregroundCallState = getForegroundCall().getState();
        GsmCdmaCall.State backgroundCallState = getBackgroundCall().getState();
        GsmCdmaCall.State ringingCallState = getRingingCall().getState();