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

Commit ab48d169 authored by Hui Wang's avatar Hui Wang
Browse files

Set apn setting immediately when calling bringUp

As the apn setting is set in different thread as the caller, there
could be race condition in some corner cases.

Bug: 175085972
Test: Manual
Change-Id: I39fac148ddeac524545ff282dbe71b89bff8d02c
parent b30e0b4c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ public class DataConnection extends StateMachine {
        }
    }

    private ApnSetting mApnSetting;
    private volatile ApnSetting mApnSetting;
    private ConnectionParams mConnectionParams;
    private DisconnectParams mDisconnectParams;
    @DataFailureCause
@@ -3048,6 +3048,11 @@ public class DataConnection extends StateMachine {
        if (DBG) {
            log("bringUp: apnContext=" + apnContext + " onCompletedMsg=" + onCompletedMsg);
        }

        if (mApnSetting == null) {
            mApnSetting = apnContext.getApnSetting();
        }

        sendMessage(DataConnection.EVENT_CONNECT,
                new ConnectionParams(apnContext, profileId, rilRadioTechnology, onCompletedMsg,
                        connectionGeneration, requestType, subId, isApnPreferred));