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

Commit a52b82b6 authored by pengfeix's avatar pengfeix Committed by android-build-merger
Browse files

Merge "IMS: Add CF and CW support over CDMA-IMS"

am: 8efa207d

Change-Id: I4f1c2608c81af44bff885ac8e47db0bb45a9a713
parents 04215880 8efa207d
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -1747,9 +1747,15 @@ public class GsmCdmaPhone extends Phone {
        return (action == CF_ACTION_ENABLE) || (action == CF_ACTION_REGISTRATION);
    }

    private boolean isImsUtEnabledOverCdma() {
        return isPhoneTypeCdmaLte()
            && mImsPhone != null
            && mImsPhone.isUtEnabled();
    }

    @Override
    public void getCallForwardingOption(int commandInterfaceCFReason, Message onComplete) {
        if (isPhoneTypeGsm()) {
        if (isPhoneTypeGsm() || isImsUtEnabledOverCdma()) {
            Phone imsPhone = mImsPhone;
            if ((imsPhone != null)
                    && ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE)
@@ -1770,7 +1776,7 @@ public class GsmCdmaPhone extends Phone {
                        CommandsInterface.SERVICE_CLASS_VOICE, null, resp);
            }
        } else {
            loge("getCallForwardingOption: not possible in CDMA");
            loge("getCallForwardingOption: not possible in CDMA without IMS");
        }
    }

@@ -1780,7 +1786,7 @@ public class GsmCdmaPhone extends Phone {
            String dialingNumber,
            int timerSeconds,
            Message onComplete) {
        if (isPhoneTypeGsm()) {
        if (isPhoneTypeGsm() || isImsUtEnabledOverCdma()) {
            Phone imsPhone = mImsPhone;
            if ((imsPhone != null)
                    && ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE)
@@ -1809,7 +1815,7 @@ public class GsmCdmaPhone extends Phone {
                        resp);
            }
        } else {
            loge("setCallForwardingOption: not possible in CDMA");
            loge("setCallForwardingOption: not possible in CDMA without IMS");
        }
    }

@@ -1902,7 +1908,7 @@ public class GsmCdmaPhone extends Phone {

    @Override
    public void getCallWaiting(Message onComplete) {
        if (isPhoneTypeGsm()) {
        if (isPhoneTypeGsm() || isImsUtEnabledOverCdma()) {
            Phone imsPhone = mImsPhone;
            if ((imsPhone != null)
                    && ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE)
@@ -1921,7 +1927,7 @@ public class GsmCdmaPhone extends Phone {

    @Override
    public void setCallWaiting(boolean enable, Message onComplete) {
        if (isPhoneTypeGsm()) {
        if (isPhoneTypeGsm() || isImsUtEnabledOverCdma()) {
            Phone imsPhone = mImsPhone;
            if ((imsPhone != null)
                    && ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE)
@@ -1932,7 +1938,7 @@ public class GsmCdmaPhone extends Phone {

            mCi.setCallWaiting(enable, CommandsInterface.SERVICE_CLASS_VOICE, onComplete);
        } else {
            loge("method setCallWaiting is NOT supported in CDMA!");
            loge("method setCallWaiting is NOT supported in CDMA without IMS!");
        }
    }