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

Commit c31837b5 authored by Jack Yu's avatar Jack Yu Committed by Android (Google) Code Review
Browse files

Merge "Fixed that APN context stuck in SCANNING state"

parents bd2b2415 9d052635
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1596,9 +1596,15 @@ public class DcTracker extends Handler {
                str.append("isDataEnabled() = false. " + mDataEnabledSettings);
            }

            // If this is a data retry, we should set the APN state to FAILED so it won't stay
            // in SCANNING forever.
            if (apnContext.getState() == DctConstants.State.SCANNING) {
                apnContext.setState(DctConstants.State.FAILED);
                str.append(" Stop retrying.");
            }

            if (DBG) log(str.toString());
            apnContext.requestLog(str.toString());

            return false;
        }
    }
@@ -2464,7 +2470,6 @@ public class DcTracker extends Handler {
                DctConstants.State state = apnContext.getState();
                switch(state) {
                    case CONNECTING:
                    case SCANNING:
                    case CONNECTED:
                    case DISCONNECTING:
                        // We're "READY" and active so just return
@@ -2474,6 +2479,7 @@ public class DcTracker extends Handler {
                    case IDLE:
                        // fall through: this is unexpected but if it happens cleanup and try setup
                    case FAILED:
                    case SCANNING:
                    case RETRYING: {
                        // We're "READY" but not active so disconnect (cleanup = true) and
                        // connect (trySetup = true) to be sure we retry the connection.