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

Commit e3c283a6 authored by Muhammed Siju's avatar Muhammed Siju
Browse files

Fix LTE data call issue with OMH SIM cards.

Do not use OMH profiles for data call on 3GPP RATs.
Reduce the APN retry delay for APN_CHANGED and NW_TYPE_CHANGED
reasons.

Change-Id: I596a4585352a323338d2f05809cf26eb9c7b9edc
CRs-Fixed: 763912
parent 47b4b704
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -2484,8 +2484,9 @@ public final 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 {
@@ -2522,7 +2523,7 @@ public final 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);
@@ -2534,7 +2535,7 @@ public final 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);
        }
    }

@@ -2586,7 +2587,7 @@ public final 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);
@@ -2755,7 +2756,7 @@ public final class DcTracker extends DcTrackerBase {
        int radioTech = mPhone.getServiceState().getRilDataRadioTechnology();

        if (mOmhApt != null && ServiceState.RIL_RADIO_TECHNOLOGY_EHRPD !=
                radioTech) {
                radioTech && !ServiceState.isGsm(radioTech)) {
            ArrayList<ApnSetting> mOmhApnsList = new ArrayList<ApnSetting>();
            mOmhApnsList = mOmhApt.getOmhApnProfilesList();
            if (!mOmhApnsList.isEmpty()) {