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

Commit c6bbea82 authored by Wink Saville's avatar Wink Saville
Browse files

Map DcConstants.RETRYING to PhoneConstants.State.DISCONNECTED.

Previously RETRYING was mapped to CONNECTING this means that
ConnectivityService will not remove the route and a subsequent
change in IP addresses won't work because an old route has not
been removed.

By mapping to DISCONNECTED ConnectivityService will remove the
route. Another alternative would be to add PhoneConstants.State.RETRYING
but this is a simpler change so we'll try it first.

Bug: 8486114
Change-Id: I1c9946a1e441feda83f13730e835445624a87218
parent 1f2a2323
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ public class CDMALTEPhone extends CDMAPhone {
            ret = PhoneConstants.DataState.DISCONNECTED;
        } else {
            switch (mDcTracker.getState(apnType)) {
                case RETRYING:
                case FAILED:
                case IDLE:
                    ret = PhoneConstants.DataState.DISCONNECTED;
@@ -139,7 +140,6 @@ public class CDMALTEPhone extends CDMAPhone {
                    }
                    break;

                case RETRYING:
                case CONNECTING:
                case SCANNING:
                    ret = PhoneConstants.DataState.CONNECTING;
+1 −1
Original line number Diff line number Diff line
@@ -670,6 +670,7 @@ public class CDMAPhone extends PhoneBase {
            ret = PhoneConstants.DataState.DISCONNECTED;
        } else {
            switch (mDcTracker.getState(apnType)) {
                case RETRYING:
                case FAILED:
                case IDLE:
                    ret = PhoneConstants.DataState.DISCONNECTED;
@@ -685,7 +686,6 @@ public class CDMAPhone extends PhoneBase {
                    }
                break;

                case RETRYING:
                case CONNECTING:
                case SCANNING:
                    ret = PhoneConstants.DataState.CONNECTING;
+2 −2
Original line number Diff line number Diff line
@@ -674,12 +674,12 @@ public abstract class DcTrackerBase extends Handler {
                break;

            case DctConstants.EVENT_DISCONNECT_DONE:
                log("DataConnectoinTracker.handleMessage: EVENT_DISCONNECT_DONE msg=" + msg);
                log("DataConnectionTracker.handleMessage: EVENT_DISCONNECT_DONE msg=" + msg);
                onDisconnectDone(msg.arg1, (AsyncResult) msg.obj);
                break;

            case DctConstants.EVENT_DISCONNECT_DC_RETRYING:
                log("DataConnectoinTracker.handleMessage: EVENT_DISCONNECT_DC_RETRYING msg=" + msg);
                log("DataConnectionTracker.handleMessage: EVENT_DISCONNECT_DC_RETRYING msg=" + msg);
                onDisconnectDcRetrying(msg.arg1, (AsyncResult) msg.obj);
                break;

+1 −1
Original line number Diff line number Diff line
@@ -300,6 +300,7 @@ public class GSMPhone extends PhoneBase {
            ret = PhoneConstants.DataState.DISCONNECTED;
        } else { /* mSST.gprsState == ServiceState.STATE_IN_SERVICE */
            switch (mDcTracker.getState(apnType)) {
                case RETRYING:
                case FAILED:
                case IDLE:
                    ret = PhoneConstants.DataState.DISCONNECTED;
@@ -315,7 +316,6 @@ public class GSMPhone extends PhoneBase {
                    }
                break;

                case RETRYING:
                case CONNECTING:
                case SCANNING:
                    ret = PhoneConstants.DataState.CONNECTING;