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

Commit 7e1fba5b authored by Jayachandran C's avatar Jayachandran C
Browse files

Clear mAutoAttachOnCreation on Radio Off, Radio Unavailable or SIM not ready

mAutoAttachOnCreation allows data call for nwTypeChanged after
airplane mode toggle or radio reset but before modem actaully
registers on service. This causes data leak on roaming networks
for shorter time even though data roaming is disabled.

Bug: 31266202
Change-Id: Ia83146a0dafd9e2967d3e99829eea0ec08218b8a
parent 44000fe8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2415,6 +2415,8 @@ public class DcTracker extends Handler {
        cleanUpAllConnections(true, Phone.REASON_SIM_NOT_READY);
        mAllApnSettings = null;
        mAutoAttachOnCreationConfig = false;
        // Clear auto attach as modem is expected to do a new attach once SIM is ready
        mAutoAttachOnCreation.set(false);
    }

    private void onSetDependencyMet(String apnType, boolean met) {
@@ -2814,6 +2816,9 @@ public class DcTracker extends Handler {

        mReregisterOnReconnectFailure = false;

        // Clear auto attach as modem is expected to do a new attach
        mAutoAttachOnCreation.set(false);

        if (mPhone.getSimulatedRadioControl() != null) {
            // Assume data is connected on the simulator
            // FIXME  this can be improved