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

Commit 2cb499b0 authored by Amit Mahajan's avatar Amit Mahajan Committed by Android Git Automerger
Browse files

am 4325c564: Merge "Change to ignore onSubscriptionsChanged() in SST if active...

am 4325c564: Merge "Change to ignore onSubscriptionsChanged() in SST if active subId does not change." into lmp-mr1-dev

* commit '4325c564':
  Change to ignore onSubscriptionsChanged() in SST if active subId does not change.
parents 4e065e19 4325c564
Loading
Loading
Loading
Loading
+31 −27
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@ public abstract class ServiceStateTracker extends Handler {
    protected SubscriptionManager mSubscriptionManager;
    protected final OnSubscriptionsChangedListener mOnSubscriptionsChangedListener =
            new OnSubscriptionsChangedListener() {
        private int lastActiveSubId = -1; // < 0 is invalid subId
        /**
         * Callback invoked when there is any change to any SubscriptionInfo. Typically
         * this method would invoke {@link SubscriptionManager#getActiveSubscriptionInfoList}
@@ -236,6 +237,8 @@ public abstract class ServiceStateTracker extends Handler {
            // Set the network type, in case the radio does not restore it.
            int subId = mPhoneBase.getSubId();
            if (SubscriptionManager.isValidSubscriptionId(subId)) {
                if (lastActiveSubId != subId) {
                    lastActiveSubId = subId;
                    int networkType = PhoneFactory.calculatePreferredNetworkType(
                            mPhoneBase.getContext(), subId);
                    mCi.setPreferredNetworkType(networkType, null);
@@ -270,6 +273,7 @@ public abstract class ServiceStateTracker extends Handler {
                        ServiceState.rilRadioTechnologyToString(mSS.getRilDataRadioTechnology()));
                }
            }
        }
    };

    protected ServiceStateTracker(PhoneBase phoneBase, CommandsInterface ci, CellInfo cellInfo) {