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

Commit bf1421ea authored by Jordan Liu's avatar Jordan Liu
Browse files

Revert "Fix to load CarrierConfig after SUB is generated"

This reverts commit 7cb0c75c.

Reason for revert: Change is no longer needed (see b/112870294)

Change-Id: I707ff2ee8a2b16c910d9859161a7661da86580fe
parent 7cb0c75c
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@ import android.telephony.ims.feature.ImsFeature;
import android.telephony.ims.feature.MmTelFeature;
import android.telephony.ims.stub.ImsConfigImplBase;
import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.telephony.SubscriptionManager.OnSubscriptionsChangedListener;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Log;
@@ -265,21 +264,6 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
                }
            };

    private final OnSubscriptionsChangedListener mOnSubscriptionsChangedListener =
            new OnSubscriptionsChangedListener() {
                final AtomicInteger mPreviousSubId =
                        new AtomicInteger(SubscriptionManager.INVALID_SUBSCRIPTION_ID);

                @Override
                public void onSubscriptionsChanged() {
                    int subId = mPhone.getSubId();
                    if (mPreviousSubId.getAndSet(subId) != subId
                            && SubscriptionController.getInstance().isActiveSubId(subId)) {
                        cacheCarrierConfiguration(subId);
                    }
                }
            };

    //***** Constants

    static final int MAX_CONNECTIONS = 7;
@@ -729,8 +713,6 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
        intentfilter.addAction(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED);
        intentfilter.addAction(TelecomManager.ACTION_CHANGE_DEFAULT_DIALER);
        mPhone.getContext().registerReceiver(mReceiver, intentfilter);
        SubscriptionManager.from(mPhone.getContext())
            .addOnSubscriptionsChangedListener(mOnSubscriptionsChangedListener);
        cacheCarrierConfiguration(mPhone.getSubId());

        mPhone.getDefaultPhone().registerForDataEnabledChanged(
@@ -872,8 +854,6 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
        mPhone.getContext().unregisterReceiver(mReceiver);
        mPhone.getDefaultPhone().unregisterForDataEnabledChanged(this);
        mImsManagerConnector.disconnect();
        SubscriptionManager.from(mPhone.getContext())
            .removeOnSubscriptionsChangedListener(mOnSubscriptionsChangedListener);
    }

    @Override