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

Commit dca77760 authored by Muhammed Siju's avatar Muhammed Siju Committed by Linux Build Service Account
Browse files

Fix back to back data call requests on same apn.

If one ApnContext is in DISCONNECTING state and another ApnContext
which uses the same apn needs to be brought up, current code doesnot
share the same DataConnection object. This may lead to back to back
requests on same apn. To avoid this, allow sharing of DC even when it
is in DISCONNECTING state. This will allow DC to be brought up immediately
after getting disconnected.

CRs-Fixed: 712333
Change-Id: I3d6fef87014f339b04393ec33f86d89beab8c644
parent c6c7bab2
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -2063,6 +2063,13 @@ public final class DcTracker extends DcTrackerBase {
                            case CONNECTING:
                            case CONNECTING:
                                potentialDcac = curDcac;
                                potentialDcac = curDcac;
                                potentialApnCtx = curApnCtx;
                                potentialApnCtx = curApnCtx;
                                break;
                            case DISCONNECTING:
                                //Update for DISCONNECTING only if there is no other potential match
                                if (potentialDcac == null) {
                                    potentialDcac = curDcac;
                                    potentialApnCtx = curApnCtx;
                                }
                            default:
                            default:
                                // Not connected, potential unchanged
                                // Not connected, potential unchanged
                                break;
                                break;
@@ -2081,6 +2088,13 @@ public final class DcTracker extends DcTrackerBase {
                        case CONNECTING:
                        case CONNECTING:
                            potentialDcac = curDcac;
                            potentialDcac = curDcac;
                            potentialApnCtx = curApnCtx;
                            potentialApnCtx = curApnCtx;
                            break;
                        case DISCONNECTING:
                            // Update for DISCONNECTING only if there is no other potential match
                            if (potentialDcac == null) {
                                potentialDcac = curDcac;
                                potentialApnCtx = curApnCtx;
                            }
                        default:
                        default:
                            // Not connected, potential unchanged
                            // Not connected, potential unchanged
                            break;
                            break;