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

Commit f3fa9930 authored by Pengquan Meng's avatar Pengquan Meng Committed by Gerrit Code Review
Browse files

Merge "Remove internal ApnSetting."

parents 3e07d437 80925a70
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -22,11 +22,10 @@ import android.os.PersistableBundle;
import android.os.SystemProperties;
import android.telephony.CarrierConfigManager;
import android.telephony.Rlog;
import android.telephony.data.ApnSetting;
import android.text.TextUtils;
import android.util.Pair;

import com.android.internal.telephony.dataconnection.ApnSetting;

import java.util.ArrayList;
import java.util.Random;

@@ -506,7 +505,9 @@ public class RetryManager {
            if (++index == mWaitingApns.size()) index = 0;

            // Stop if we find the non-failed APN.
            if (mWaitingApns.get(index).permanentFailed == false) break;
            if (!mWaitingApns.get(index).getPermanentFailed()) {
                break;
            }

            // If we've already cycled through all the APNs, that means there is no APN we can try
            if (index == mCurrentApnIndex) return null;
@@ -553,7 +554,9 @@ public class RetryManager {
            if (++index >= mWaitingApns.size()) index = 0;

            // Stop if we find the non-failed APN.
            if (mWaitingApns.get(index).permanentFailed == false) break;
            if (!mWaitingApns.get(index).getPermanentFailed()) {
                break;
            }

            // If we've already cycled through all the APNs, that means all APNs have
            // permanently failed
@@ -594,7 +597,7 @@ public class RetryManager {
     * */
    public void markApnPermanentFailed(ApnSetting apn) {
        if (apn != null) {
            apn.permanentFailed = true;
            apn.setPermanentFailed(true);
        }
    }

@@ -627,7 +630,7 @@ public class RetryManager {
        configureRetry();

        for (ApnSetting apn : mWaitingApns) {
            apn.permanentFailed = false;
            apn.setPermanentFailed(false);
        }

        log("Setting " + mWaitingApns.size() + " waiting APNs.");
+11 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.net.NetworkCapabilities;
import android.net.NetworkConfig;
import android.net.NetworkRequest;
import android.telephony.Rlog;
import android.telephony.data.ApnSetting;
import android.text.TextUtils;
import android.util.LocalLog;
import android.util.SparseIntArray;
@@ -128,6 +129,14 @@ public class ApnContext {
        return mApnType;
    }

    /**
     * Gets the APN type bitmask.
     * @return The APN type bitmask
     */
    public int getApnTypeBitmask() {
        return ApnSetting.getApnTypesBitmaskFromString(mApnType);
    }

    /**
     * Get the data call async channel.
     * @return The data call async channel
@@ -392,8 +401,8 @@ public class ApnContext {
        String provisioningApn = mPhone.getContext().getResources()
                .getString(R.string.mobile_provisioning_apn);
        if (!TextUtils.isEmpty(provisioningApn) &&
                (mApnSetting != null) && (mApnSetting.apn != null)) {
            return (mApnSetting.apn.equals(provisioningApn));
                (mApnSetting != null) && (mApnSetting.getApnName() != null)) {
            return (mApnSetting.getApnName().equals(provisioningApn));
        } else {
            return false;
        }
Loading