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

Commit c992aea9 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11065517 from d0e80f47 to 24Q1-release

Change-Id: I3b52eedfe5d5adce4e1e7805b3f6837d24b227bf
parents 1bcbef2e d0e80f47
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
package: "com.android.internal.telephony.flags"

flag {
    name: "esim_bootstrap_provisioning_flag"
    namespace: "telephony"
    description: "This flag controls eSIM Bootstrap provisioning feature support."
    bug:"298567545"
}
flag {
    name: "imsi_key_retry_download_on_phone_unlock"
    namespace: "telephony"
+1 −6
Original line number Diff line number Diff line
@@ -2290,10 +2290,6 @@ public class DataNetwork extends StateMachine {
            }
        }

        if (mDataNetworkController.isEsimBootStrapProvisioningActivated()) {
            builder.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED);
        }

        // If one of the capabilities are for special use, for example, IMS, CBS, then this
        // network should be restricted, regardless data is enabled or not.
        if (NetworkCapabilitiesUtils.inferRestrictedCapability(builder.build())
@@ -3322,8 +3318,7 @@ public class DataNetwork extends StateMachine {
            TelephonyNetworkRequest networkRequest = mAttachedNetworkRequestList.get(0);
            DataProfile dataProfile = mDataNetworkController.getDataProfileManager()
                    .getDataProfileForNetworkRequest(networkRequest, targetNetworkType,
                            mPhone.getServiceState().isUsingNonTerrestrialNetwork(),
                            mDataNetworkController.isEsimBootStrapProvisioningActivated(), false);
                            mPhone.getServiceState().isUsingNonTerrestrialNetwork(), false);
            // Some carriers have different profiles between cellular and IWLAN. We need to
            // dynamically switch profile, but only when those profiles have same APN name.
            if (dataProfile != null && dataProfile.getApnSetting() != null
+1 −22
Original line number Diff line number Diff line
@@ -101,8 +101,6 @@ import com.android.internal.telephony.data.DataStallRecoveryManager.DataStallRec
import com.android.internal.telephony.data.LinkBandwidthEstimator.LinkBandwidthEstimatorCallback;
import com.android.internal.telephony.flags.FeatureFlags;
import com.android.internal.telephony.ims.ImsResolver;
import com.android.internal.telephony.subscription.SubscriptionInfoInternal;
import com.android.internal.telephony.subscription.SubscriptionManagerService;
import com.android.internal.telephony.util.TelephonyUtils;
import com.android.telephony.Rlog;

@@ -1332,7 +1330,6 @@ public class DataNetworkController extends Handler {
                        .getDataProfileForNetworkRequest(requestList.getFirst(),
                                TelephonyManager.NETWORK_TYPE_IWLAN,
                                mServiceState.isUsingNonTerrestrialNetwork(),
                                isEsimBootStrapProvisioningActivated(),
                                false/*ignorePermanentFailure*/);
                if (candidate != null && !dataNetwork.getDataProfile().equals(candidate)) {
                    logv("But skipped because found better data profile " + candidate
@@ -1497,8 +1494,7 @@ public class DataNetworkController extends Handler {
            evaluation.addDataAllowedReason(DataAllowedReason.EMERGENCY_REQUEST);
            evaluation.setCandidateDataProfile(mDataProfileManager.getDataProfileForNetworkRequest(
                    networkRequest, getDataNetworkType(transport),
                    mServiceState.isUsingNonTerrestrialNetwork(),
                    isEsimBootStrapProvisioningActivated(), true));
                    mServiceState.isUsingNonTerrestrialNetwork(), true));
            networkRequest.setEvaluation(evaluation);
            log(evaluation.toString());
            return evaluation;
@@ -1657,7 +1653,6 @@ public class DataNetworkController extends Handler {
        DataProfile dataProfile = mDataProfileManager
                .getDataProfileForNetworkRequest(networkRequest, networkType,
                        mServiceState.isUsingNonTerrestrialNetwork(),
                        isEsimBootStrapProvisioningActivated(),
                        // If the evaluation is due to environmental changes, then we should ignore
                        // the permanent failure reached earlier.
                        reason.isConditionBased());
@@ -2276,22 +2271,6 @@ public class DataNetworkController extends Handler {
                .orElse(null);
    }

    /**
     * Check if the device is in eSIM bootstrap provisioning state.
     *
     * @return {@code true} if the device is under eSIM bootstrap provisioning.
     */
    public boolean isEsimBootStrapProvisioningActivated() {
        if (!mFeatureFlags.esimBootstrapProvisioningFlag()) {
            return false;
        }

        SubscriptionInfoInternal subInfo = SubscriptionManagerService.getInstance()
                .getSubscriptionInfoInternal(mPhone.getSubId());
        return subInfo != null
                && subInfo.getProfileClass() == SubscriptionManager.PROFILE_CLASS_PROVISIONING;
    }

    /**
     * Register for IMS feature registration state.
     *
+37 −52
Original line number Diff line number Diff line
@@ -255,7 +255,6 @@ public class DataProfileManager extends Handler {
        cursor.close();
        return dataProfile;
    }

    /**
     * Update all data profiles, including preferred data profile, and initial attach data profile.
     * Also send those profiles down to the modem if needed.
@@ -641,12 +640,12 @@ public class DataProfileManager extends Handler {
     */
    public @Nullable DataProfile getDataProfileForNetworkRequest(
            @NonNull TelephonyNetworkRequest networkRequest, @NetworkType int networkType,
            boolean isNtn, boolean isEsimBootstrapProvisioning, boolean ignorePermanentFailure) {
            boolean isNtn, boolean ignorePermanentFailure) {
        ApnSetting apnSetting = null;
        if (networkRequest.hasAttribute(TelephonyNetworkRequest
                .CAPABILITY_ATTRIBUTE_APN_SETTING)) {
            apnSetting = getApnSettingForNetworkRequest(networkRequest, networkType, isNtn,
                    isEsimBootstrapProvisioning, ignorePermanentFailure);
                    ignorePermanentFailure);
        }

        TrafficDescriptor.Builder trafficDescriptorBuilder = new TrafficDescriptor.Builder();
@@ -712,19 +711,17 @@ public class DataProfileManager extends Handler {
     */
    private @Nullable ApnSetting getApnSettingForNetworkRequest(
            @NonNull TelephonyNetworkRequest networkRequest, @NetworkType int networkType,
            boolean isNtn, boolean isEsimBootStrapProvisioning, boolean ignorePermanentFailure) {
            boolean isNtn, boolean ignorePermanentFailure) {
        if (!networkRequest.hasAttribute(
                TelephonyNetworkRequest.CAPABILITY_ATTRIBUTE_APN_SETTING)) {
            loge("Network request does not have APN setting attribute.");
            return null;
        }

        // if esim bootstrap provisioning in progress, do not apply preferred data profile
        if (!isEsimBootStrapProvisioning) {
        if (mFeatureFlags.carrierEnabledSatelliteFlag()) {
            // If the preferred data profile can be used, always use it if it can satisfy the
                // network request with current network type (even though it's been marked as
                // permanent failed.)
            // network request with current network type (even though it's been marked as permanent
            // failed.)
            if (mPreferredDataProfile != null
                    && networkRequest.canBeSatisfiedBy(mPreferredDataProfile)
                    && mPreferredDataProfile.getApnSetting() != null
@@ -743,13 +740,12 @@ public class DataProfileManager extends Handler {
            }
        } else {
            // If the preferred data profile can be used, always use it if it can satisfy the
                // network request with current network type (even though it's been marked as
                // permanent failed.)
            // network request with current network type (even though it's been marked as permanent
            // failed.)
            if (mPreferredDataProfile != null
                    && networkRequest.canBeSatisfiedBy(mPreferredDataProfile)
                    && mPreferredDataProfile.getApnSetting() != null
                        && mPreferredDataProfile.getApnSetting()
                        .canSupportNetworkType(networkType)) {
                    && mPreferredDataProfile.getApnSetting().canSupportNetworkType(networkType)) {
                if (ignorePermanentFailure || !mPreferredDataProfile.getApnSetting()
                        .getPermanentFailed()) {
                    return mPreferredDataProfile.getApnSetting();
@@ -759,7 +755,6 @@ public class DataProfileManager extends Handler {
                return null;
            }
        }
        }

        // Filter out the data profile that can't satisfy the request.
        // Preferred data profile should be returned in the top of the list.
@@ -783,8 +778,6 @@ public class DataProfileManager extends Handler {
                .filter((dp) -> {
                    if (dp.getApnSetting() == null) return false;
                    if (!dp.getApnSetting().canSupportNetworkType(networkType)) return false;
                    if (isEsimBootStrapProvisioning
                            != dp.getApnSetting().isEsimBootstrapProvisioning()) return false;
                    if (mFeatureFlags.carrierEnabledSatelliteFlag()) {
                        if (isNtn && !dp.getApnSetting().isForInfrastructure(
                                ApnSetting.INFRASTRUCTURE_SATELLITE)) {
@@ -827,10 +820,6 @@ public class DataProfileManager extends Handler {
            return null;
        }

        if (isEsimBootStrapProvisioning) {
            log("Found esim bootstrap provisioning data profile for network request: "
                    + dataProfiles.get(0).getApnSetting());
        }
        return dataProfiles.get(0).getApnSetting();
    }

@@ -876,9 +865,7 @@ public class DataProfileManager extends Handler {
                        .addCapability(NetworkCapabilities.NET_CAPABILITY_DUN)
                        .build(), mPhone);
        return getDataProfileForNetworkRequest(networkRequest, networkType,
                mPhone.getServiceState().isUsingNonTerrestrialNetwork(),
                mDataNetworkController.isEsimBootStrapProvisioningActivated(),
                true) != null;
                mPhone.getServiceState().isUsingNonTerrestrialNetwork(), true) != null;
    }

    /**
@@ -1053,8 +1040,6 @@ public class DataProfileManager extends Handler {
        apnBuilder.setCarrierId(apn1.getCarrierId());
        apnBuilder.setSkip464Xlat(apn1.getSkip464Xlat());
        apnBuilder.setAlwaysOn(apn1.isAlwaysOn());
        apnBuilder.setInfrastructureBitmask(apn1.getInfrastructureBitmask());
        apnBuilder.setEsimBootstrapProvisioning(apn1.isEsimBootstrapProvisioning());

        return new DataProfile.Builder()
                .setApnSetting(apnBuilder.build())
+16 −204

File changed.

Preview size limit exceeded, changes collapsed.

Loading