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

Commit 04fe63f1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "CSFB SS: add setCallWaiting API for service class"

parents 3e6b6829 53a17680
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -2228,14 +2228,6 @@ public class GsmCdmaPhone extends Phone {

    @Override
    public void setCallWaiting(boolean enable, Message onComplete) {
        if (isPhoneTypeGsm() || isImsUtEnabledOverCdma()) {
            Phone imsPhone = mImsPhone;
            if ((imsPhone != null)
                    && ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE)
                    || imsPhone.isUtEnabled())) {
                imsPhone.setCallWaiting(enable, onComplete);
                return;
            }
        int serviceClass = CommandsInterface.SERVICE_CLASS_VOICE;
        CarrierConfigManager configManager = (CarrierConfigManager)
            getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
@@ -2244,6 +2236,19 @@ public class GsmCdmaPhone extends Phone {
            serviceClass = b.getInt(CarrierConfigManager.KEY_CALL_WAITING_SERVICE_CLASS_INT,
                    CommandsInterface.SERVICE_CLASS_VOICE);
        }
        setCallWaiting(enable, serviceClass, onComplete);
    }

    @Override
    public void setCallWaiting(boolean enable, int serviceClass, Message onComplete) {
        if (isPhoneTypeGsm() || isImsUtEnabledOverCdma()) {
            Phone imsPhone = mImsPhone;
            if ((imsPhone != null)
                    && ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE)
                    || imsPhone.isUtEnabled())) {
                imsPhone.setCallWaiting(enable, onComplete);
                return;
            }
            mCi.setCallWaiting(enable, serviceClass, onComplete);
        } else {
            loge("method setCallWaiting is NOT supported in CDMA without IMS!");
+6 −0
Original line number Diff line number Diff line
@@ -3545,6 +3545,12 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        return null;
    }

    /*
     * This function is for CSFB SS. GsmCdmaPhone overrides this function.
     */
    public void setCallWaiting(boolean enable, int serviceClass, Message onComplete) {
    }

    /*
     * Returns the subscription id.
     */