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

Commit 1d92343e authored by Shishir Agrawal's avatar Shishir Agrawal Committed by Android (Google) Code Review
Browse files

Merge "DcTracker: Cleanup connections when IccRecords is destroyed." into lmp-mr1-dev

parents 626e1203 0469925a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ public interface Phone {
    static final String REASON_CONNECTED = "connected";
    static final String REASON_SINGLE_PDN_ARBITRATION = "SinglePdnArbitration";
    static final String REASON_DATA_SPECIFIC_DISABLED = "specificDisabled";
    static final String REASON_SIM_NOT_READY = "simNotReady";

    // Used for band mode selection methods
    static final int BM_UNSPECIFIED = 0; // selected by baseband automatically
+10 −0
Original line number Diff line number Diff line
@@ -1528,6 +1528,14 @@ public final class DcTracker extends DcTrackerBase {
        setupDataOnConnectableApns(Phone.REASON_SIM_LOADED);
    }

    private void onSimNotReady() {
        if (DBG) log("onSimNotReady");

        cleanUpAllConnections(true, Phone.REASON_SIM_NOT_READY);
        mAllApnSettings = null;
        mAutoAttachOnCreationConfig = false;
    }

    @Override
    protected void onSetDependencyMet(String apnType, boolean met) {
        // don't allow users to tweak hipri to work around default dependency not met
@@ -2771,6 +2779,8 @@ public final class DcTracker extends DcTrackerBase {
                mIccRecords.set(newIccRecords);
                newIccRecords.registerForRecordsLoaded(
                        this, DctConstants.EVENT_RECORDS_LOADED, null);
            } else {
                onSimNotReady();
            }
        }
    }