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

Commit 85d41f4f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Update IMS carrier configs"

parents 78600da7 09b1bf2e
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -1440,6 +1440,12 @@ public class ImsManager {

        if (!mConfigUpdated || force) {
            try {
                PersistableBundle imsCarrierConfigs =
                        mConfigManager.getConfigByComponentForSubId(
                                CarrierConfigManager.Ims.KEY_PREFIX, getSubId());

                updateImsCarrierConfigs(imsCarrierConfigs);

                // Note: currently the order of updates is set to produce different order of
                // changeEnabledCapabilities() function calls from setAdvanced4GMode(). This is done
                // to differentiate this code path from vendor code perspective.
@@ -2813,4 +2819,20 @@ public class ImsManager {
        return SubscriptionManager.isValidSubscriptionId(subId) &&
                subId != SubscriptionManager.DEFAULT_SUBSCRIPTION_ID;
    }

    private void updateImsCarrierConfigs(PersistableBundle configs) throws ImsException {
        checkAndThrowExceptionIfServiceUnavailable();

        IImsConfig config = mMmTelFeatureConnection.getConfigInterface();
        if (config == null) {
            throw new ImsException("getConfigInterface()",
                    ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
        }
        try {
            config.updateImsCarrierConfigs(configs);
        } catch (RemoteException e) {
            throw new ImsException("updateImsCarrierConfigs()", e,
                    ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN);
        }
    }
}