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

Commit d4197e85 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Reduce APN retry delay"

parents 37b5b2b8 30770fba
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -2099,8 +2099,9 @@ public class DcTracker extends DcTrackerBase {
    /**
     * @return number of milli-seconds to delay between trying apns'
     */
    private int getApnDelay() {
        if (mFailFast) {
    private int getApnDelay(String reason) {
        if (mFailFast || Phone.REASON_NW_TYPE_CHANGED.equals(reason) ||
                Phone.REASON_APN_CHANGED.equals(reason)) {
            return SystemProperties.getInt("persist.radio.apn_ff_delay",
                    APN_FAIL_FAST_DELAY_DEFAULT_MILLIS);
        } else {
@@ -2137,7 +2138,7 @@ public class DcTracker extends DcTrackerBase {
                    log("onDataSetupCompleteError: All APN's had permanent failures, stop retrying");
                }
            } else {
                int delay = getApnDelay();
                int delay = getApnDelay(Phone.REASON_APN_FAILED);
                if (DBG) {
                    log("onDataSetupCompleteError: Not all APN's had permanent failures delay="
                            + delay);
@@ -2149,7 +2150,7 @@ public class DcTracker extends DcTrackerBase {
            apnContext.setState(DctConstants.State.SCANNING);
            // Wait a bit before trying the next APN, so that
            // we're not tying up the RIL command channel
            startAlarmForReconnect(getApnDelay(), apnContext);
            startAlarmForReconnect(getApnDelay(Phone.REASON_APN_FAILED), apnContext);
        }
    }

@@ -2208,7 +2209,7 @@ public class DcTracker extends DcTrackerBase {
            // we're not tying up the RIL command channel.
            // This also helps in any external dependency to turn off the context.
            if(DBG) log("onDisconnectDone: attached, ready and retry after disconnect");
            startAlarmForReconnect(getApnDelay(), apnContext);
            startAlarmForReconnect(getApnDelay(apnContext.getReason()), apnContext);
        } else {
            boolean restartRadioAfterProvisioning = mPhone.getContext().getResources().getBoolean(
                    com.android.internal.R.bool.config_restartRadioAfterProvisioning);