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

Commit ed7a0e8d authored by Jack Yu's avatar Jack Yu
Browse files

Fixed handover issue on connecting data connection

Frameworks was incorrectly handover a data connection
which is still in activating state. The data connection
does not have a valid network agent and link properties
does not qualify for handover.

Test: unit test
Bug: 144012909
Merged-In: Iea9e87d1c79762bc6f233e0de7af9184753656c0
Change-Id: Iea9e87d1c79762bc6f233e0de7af9184753656c0
(cherry picked from commit ce85ca8e)
parent 8c1ee3bb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -338,16 +338,16 @@ public class TelephonyNetworkFactory extends NetworkFactory {
                if (dcTracker != null) {
                    DataConnection dc = dcTracker.getDataConnectionByApnType(
                            ApnSetting.getApnTypeString(apnType));
                    if (dc != null && (dc.isActive() || dc.isActivating())) {
                    if (dc != null && (dc.isActive())) {
                        Message onCompleteMsg = mInternalHandler.obtainMessage(
                                EVENT_DATA_HANDOVER_COMPLETED);
                        onCompleteMsg.getData().putParcelable(
                                DcTracker.DATA_COMPLETE_MSG_EXTRA_NETWORK_REQUEST, networkRequest);
                        mPendingHandovers.put(onCompleteMsg, handoverParams);
                        // TODO: Need to handle the case that the request is there, but there is no
                        // actual data connections established.
                        requestNetworkInternal(networkRequest, DcTracker.REQUEST_TYPE_HANDOVER,
                                targetTransport, onCompleteMsg);
                        log("Requested handover " + ApnSetting.getApnTypeString(apnType) + " to "
                                + AccessNetworkConstants.transportTypeToString(targetTransport));
                        handoverPending = true;
                    } else {
                        // Request is there, but no actual data connection. In this case, just move