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

Commit e09579a6 authored by Jack Yu's avatar Jack Yu Committed by android-build-merger
Browse files

Merge "Fixed that APN context stuck in SCANNING state"

am: 6a9e844f

Change-Id: Ieb834b490b19dc5a60edd1fe18e18c2b28218b79
parents 2eceb6b0 6a9e844f
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1685,9 +1685,15 @@ public class DcTracker extends Handler {
                str.append("emergency = true");
            }

            // 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;
        }
    }
@@ -2550,7 +2556,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
@@ -2560,6 +2565,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.