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

Commit 39fb52b1 authored by Amit Mahajan's avatar Amit Mahajan Committed by Android (Google) Code Review
Browse files

Merge "Change to make sure that code triggered by onSubscriptionsChanged() is...

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
parents 69dc731f b8ec2c1d
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);