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

Commit 819c7f49 authored by Ravindra's avatar Ravindra
Browse files

Telephony: report emergency call fail cause properly.

In case of normal hangup by remote party when in emergency call,
fail cause is reported as "out of service". Modify it to report
the fail cause as NORMAL.

Change-Id: I0e20f0735ea244741c8a65cc857b3ce39e69770a
CRs-Fixed: 548761
parent 66537c7f
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -426,8 +426,13 @@ public class CdmaConnection extends Connection {
                if (serviceState == ServiceState.STATE_POWER_OFF) {
                if (serviceState == ServiceState.STATE_POWER_OFF) {
                    return DisconnectCause.POWER_OFF;
                    return DisconnectCause.POWER_OFF;
                } else if (serviceState == ServiceState.STATE_OUT_OF_SERVICE
                } else if (serviceState == ServiceState.STATE_OUT_OF_SERVICE
                        || serviceState == ServiceState.STATE_EMERGENCY_ONLY) {
                        || phone.getServiceState().isEmergencyOnly()) {
                    if (phone.getServiceState().isEmergencyOnly() &&
                            causeCode == CallFailCause.NORMAL_CLEARING) {
                        return DisconnectCause.NORMAL;
                    } else {
                        return DisconnectCause.OUT_OF_SERVICE;
                        return DisconnectCause.OUT_OF_SERVICE;
                    }
                } else if (phone.mCdmaSubscriptionSource ==
                } else if (phone.mCdmaSubscriptionSource ==
                        CdmaSubscriptionSourceManager.SUBSCRIPTION_FROM_RUIM
                        CdmaSubscriptionSourceManager.SUBSCRIPTION_FROM_RUIM
                        && uiccAppState != AppState.APPSTATE_READY) {
                        && uiccAppState != AppState.APPSTATE_READY) {
+7 −2
Original line number Original line Diff line number Diff line
@@ -388,8 +388,13 @@ public class GsmConnection extends Connection {
                if (serviceState == ServiceState.STATE_POWER_OFF) {
                if (serviceState == ServiceState.STATE_POWER_OFF) {
                    return DisconnectCause.POWER_OFF;
                    return DisconnectCause.POWER_OFF;
                } else if (serviceState == ServiceState.STATE_OUT_OF_SERVICE
                } else if (serviceState == ServiceState.STATE_OUT_OF_SERVICE
                        || serviceState == ServiceState.STATE_EMERGENCY_ONLY ) {
                        || phone.getServiceState().isEmergencyOnly()) {
                    if (phone.getServiceState().isEmergencyOnly() &&
                            causeCode == CallFailCause.NORMAL_CLEARING) {
                        return DisconnectCause.NORMAL;
                    } else {
                        return DisconnectCause.OUT_OF_SERVICE;
                        return DisconnectCause.OUT_OF_SERVICE;
                    }
                } else if (uiccAppState != AppState.APPSTATE_READY) {
                } else if (uiccAppState != AppState.APPSTATE_READY) {
                    return DisconnectCause.ICC_ERROR;
                    return DisconnectCause.ICC_ERROR;
                } else if (causeCode == CallFailCause.ERROR_UNSPECIFIED) {
                } else if (causeCode == CallFailCause.ERROR_UNSPECIFIED) {