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

Commit a82c184b authored by Dheeraj Shetty's avatar Dheeraj Shetty Committed by android-build-merger
Browse files

Merge "Update IMS carrier configs" am: 85d41f4f am: 58f17c00

am: d2380d9e

Change-Id: I7896ebc7cf1b195c84de05b88250ba1093d90f03
parents 47f4dbf5 d2380d9e
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);
        }
    }
}