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

Commit f3f9967e authored by Kazuhiro Ondo's avatar Kazuhiro Ondo Committed by Wink Saville
Browse files

Make sure to update data availability in call setup capable triggers.

As "startUsingNetworkFeature()" now can trigger the initial data
connection instead of default data, FW needs to make sure each
MobileDataStateTracker is updated with the data availability
on each "data-setup capable" trigger.

Bug: 4970825
Change-Id: I6a7e479ecc1534cd723a2e8beece6b8bcd398ea7
parent dbcc57c6
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -556,6 +556,9 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
            if (DBG) log("onDataConnectionAttached: start polling notify attached");
            startNetStatPoll();
            notifyDataConnection(Phone.REASON_DATA_ATTACHED);
        } else {
            // update APN availability so that APN can be enabled.
            notifyDataAvailability(Phone.REASON_DATA_ATTACHED);
        }

        setupDataOnReadyApns(Phone.REASON_DATA_ATTACHED);
@@ -1528,7 +1531,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
        createAllApnList();
        if (mRadioAvailable) {
            if (DBG) log("onRecordsLoaded: notifying data availability");
            notifyDataAvailability(null);
            notifyDataAvailability(Phone.REASON_SIM_LOADED);
        }
        setupDataOnReadyApns(Phone.REASON_SIM_LOADED);
    }
@@ -1635,11 +1638,17 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
    @Override
    protected void onRoamingOff() {
        if (DBG) log("onRoamingOff");
        // Notify data availability so APN can be enabled.
        notifyDataAvailability(Phone.REASON_ROAMING_OFF);

        setupDataOnReadyApns(Phone.REASON_ROAMING_OFF);
    }

    @Override
    protected void onRoamingOn() {
        // Notify data availability so APN can be enabled.
        notifyDataAvailability(Phone.REASON_ROAMING_ON);

        if (getDataOnRoamingEnabled()) {
            if (DBG) log("onRoamingOn: setup data on roaming");
            setupDataOnReadyApns(Phone.REASON_ROAMING_ON);