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

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

am 39fb52b1: Merge "Change to make sure that code triggered by...

am 39fb52b1: Merge "Change to make sure that code triggered by onSubscriptionsChanged() is executed on popping out and putting same SIM back in." into lmp-mr1-dev

* commit '39fb52b1':
  Change to make sure that code triggered by onSubscriptionsChanged() is executed on popping out and putting same SIM back in.
parents 00210019 39fb52b1
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -226,7 +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
        private int previousSubId = -1; // < 0 is invalid subId
        /**
         * Callback invoked when there is any change to any SubscriptionInfo. Typically
         * this method would invoke {@link SubscriptionManager#getActiveSubscriptionInfoList}
@@ -236,9 +236,9 @@ public abstract class ServiceStateTracker extends Handler {
            if (DBG) log("SubscriptionListener.onSubscriptionInfoChanged");
            // Set the network type, in case the radio does not restore it.
            int subId = mPhoneBase.getSubId();
            if (previousSubId != subId) {
                previousSubId = subId;
                if (SubscriptionManager.isValidSubscriptionId(subId)) {
                if (lastActiveSubId != subId) {
                    lastActiveSubId = subId;
                    int networkType = PhoneFactory.calculatePreferredNetworkType(
                            mPhoneBase.getContext(), subId);
                    mCi.setPreferredNetworkType(networkType, null);