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

Commit 70c765cb authored by SongFerngWang's avatar SongFerngWang
Browse files

Set call waiting function can control the service class by carrierconfig

Set call waiting function can control the service class by carrierconfig

Bug: 112177857
Test: manual - test case as below :
1.set call waiting by difference service class.(PASS)

Change-Id: I21463823213f27995cb7e8beff7fa61a068f2dcd
parent 499ec42e
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1936,8 +1936,15 @@ public class GsmCdmaPhone extends Phone {
                imsPhone.setCallWaiting(enable, onComplete);
                return;
            }

            mCi.setCallWaiting(enable, CommandsInterface.SERVICE_CLASS_VOICE, onComplete);
            int serviceClass = CommandsInterface.SERVICE_CLASS_VOICE;
            CarrierConfigManager configManager = (CarrierConfigManager)
                    getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
            PersistableBundle b = configManager.getConfigForSubId(getSubId());
            if (b != null) {
                serviceClass = b.getInt(CarrierConfigManager.KEY_CALL_WAITING_SERVICE_CLASS_INT,
                        CommandsInterface.SERVICE_CLASS_VOICE);
            }
            mCi.setCallWaiting(enable, serviceClass, onComplete);
        } else {
            loge("method setCallWaiting is NOT supported in CDMA without IMS!");
        }
+9 −1
Original line number Diff line number Diff line
@@ -988,7 +988,15 @@ public class ImsPhone extends ImsPhoneBase {

    @Override
    public void setCallWaiting(boolean enable, Message onComplete) {
        setCallWaiting(enable, CommandsInterface.SERVICE_CLASS_VOICE, onComplete);
        int serviceClass = CommandsInterface.SERVICE_CLASS_VOICE;
        CarrierConfigManager configManager = (CarrierConfigManager)
                getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
        PersistableBundle b = configManager.getConfigForSubId(getSubId());
        if (b != null) {
            serviceClass = b.getInt(CarrierConfigManager.KEY_CALL_WAITING_SERVICE_CLASS_INT,
                    CommandsInterface.SERVICE_CLASS_VOICE);
        }
        setCallWaiting(enable, serviceClass, onComplete);
    }

    public void setCallWaiting(boolean enable, int serviceClass, Message onComplete) {