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

Commit 87ee344c authored by Gary Jian's avatar Gary Jian
Browse files

Convert the fail cause to DisconnectCause.POWER_OFF

DisconnectCause.POWER_OFF is notified to TeleService when the call
fails due to radio is off. But it will not convert in case of RADIO_OFF

To fix this, add a case that converts the fail cause to
DisconnectCause.POWER_OFF.

Bug: 178435921
Test: Ensure that the reason code is correctly converted to POWER_OFF
      after manually triggering the modem SSR
Change-Id: Ic5fa3e120a1fa395ac8048df4de92446e7ea8a8a
parent 08a5e59d
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -559,6 +559,9 @@ public class GsmCdmaConnection extends Connection {
            case CallFailCause.USER_ALERTING_NO_ANSWER:
            case CallFailCause.USER_ALERTING_NO_ANSWER:
                return DisconnectCause.TIMED_OUT;
                return DisconnectCause.TIMED_OUT;


            case CallFailCause.RADIO_OFF:
                return DisconnectCause.POWER_OFF;

            case CallFailCause.ACCESS_CLASS_BLOCKED:
            case CallFailCause.ACCESS_CLASS_BLOCKED:
            case CallFailCause.ERROR_UNSPECIFIED:
            case CallFailCause.ERROR_UNSPECIFIED:
            case CallFailCause.NORMAL_CLEARING:
            case CallFailCause.NORMAL_CLEARING:
+1 −0
Original line number Original line Diff line number Diff line
@@ -2654,6 +2654,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
                return DisconnectCause.TIMED_OUT;
                return DisconnectCause.TIMED_OUT;


            case ImsReasonInfo.CODE_LOCAL_POWER_OFF:
            case ImsReasonInfo.CODE_LOCAL_POWER_OFF:
            case ImsReasonInfo.CODE_RADIO_OFF:
                return DisconnectCause.POWER_OFF;
                return DisconnectCause.POWER_OFF;


            case ImsReasonInfo.CODE_LOCAL_LOW_BATTERY:
            case ImsReasonInfo.CODE_LOCAL_LOW_BATTERY: