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

Commit 37cacdfe authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Fix other Disconnect msg senders

We changed the params on these messages from an ApnContext to a
Pair<ApnContext, Integer>.  There were some call sites using the old
style and leading to errors.

bug:24115252
Change-Id: Ice3f075b3b93b9e76c0f0be7923f5ae2041f7ab1
parent b6dfcea9
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2096,9 +2096,12 @@ public final class DataConnection extends StateMachine {
            }
            // this can only happen if our exit has been called - we're already disconnected
            if (mApnContexts == null) return;
            for (ApnContext apnContext : mApnContexts.keySet()) {
            for (ConnectionParams cp : mApnContexts.values()) {
                final ApnContext apnContext = cp.mApnContext;
                final Pair<ApnContext, Integer> pair =
                        new Pair<ApnContext, Integer>(apnContext, cp.mConnectionGeneration);
                log("DcNetworkAgent: [unwanted]: disconnect apnContext=" + apnContext);
                Message msg = mDct.obtainMessage(DctConstants.EVENT_DISCONNECT_DONE, apnContext);
                Message msg = mDct.obtainMessage(DctConstants.EVENT_DISCONNECT_DONE, pair);
                DisconnectParams dp = new DisconnectParams(apnContext, apnContext.getReason(), msg);
                DataConnection.this.sendMessage(DataConnection.this.
                        obtainMessage(EVENT_DISCONNECT, dp));
+5 −2
Original line number Diff line number Diff line
@@ -1047,7 +1047,10 @@ public final class DcTracker extends DcTrackerBase {
                        str = "cleanUpConnection: tearing down" + (disconnectAll ? " all" : "");
                        if (DBG) log(str + "apnContext=" + apnContext);
                        apnContext.requestLog(str);
                        Message msg = obtainMessage(DctConstants.EVENT_DISCONNECT_DONE, apnContext);
                        Pair<ApnContext, Integer> pair =
                                new Pair<ApnContext, Integer>(apnContext,
                                apnContext.getConnectionGeneration());
                        Message msg = obtainMessage(DctConstants.EVENT_DISCONNECT_DONE, pair);
                        if (disconnectAll) {
                            apnContext.getDcAc().tearDownAll(apnContext.getReason(), msg);
                        } else {
@@ -1314,7 +1317,7 @@ public final class DcTracker extends DcTrackerBase {

        Message msg = obtainMessage();
        msg.what = DctConstants.EVENT_DATA_SETUP_COMPLETE;
        msg.obj = apnContext;
        msg.obj = new Pair<ApnContext, Integer>(apnContext, connectionGeneration);
        dcac.bringUp(apnContext, getInitialMaxRetry(), profileId, radioTech,
                mAutoAttachOnCreation.get(), msg, connectionGeneration);