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

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

Snap for 11044623 from ec2b2663 to 24Q1-release

Change-Id: I837d6131184629b961b132d33a627efce9789cf4
parents 91b113e1 ec2b2663
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -20,3 +20,10 @@ flag {
    description: "This flag clears cached IMS phone number when device lost IMS registration"
    bug:"288002989"
}

flag {
    name: "update_ims_service_by_gathering_provisioning_changes"
    namespace: "telephony"
    description: "This flag is created to prevent unnecessary updates when multiple provisioning items to update ims service are changed."
    bug:"302281114"
}
+8 −1
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"
}
 No newline at end of file
+21 −1
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import com.android.internal.telephony.data.LinkBandwidthEstimator;
import com.android.internal.telephony.data.PhoneSwitcher;
import com.android.internal.telephony.emergency.EmergencyNumberTracker;
import com.android.internal.telephony.flags.FeatureFlags;
import com.android.internal.telephony.flags.FeatureFlagsImpl;
import com.android.internal.telephony.imsphone.ImsExternalCallTracker;
import com.android.internal.telephony.imsphone.ImsNrSaModeHandler;
import com.android.internal.telephony.imsphone.ImsPhone;
@@ -382,8 +383,27 @@ public class TelephonyComponentFactory {
        return new InboundSmsTracker(context, cursor, isCurrentFormat3gpp2);
    }

    /**
     * Create an ImsPhoneCallTracker.
     *
     * @param imsPhone imsphone
     * @return ImsPhoneCallTracker newly created ImsPhoneCallTracker
     * @deprecated Use {@link #makeImsPhoneCallTracker(ImsPhone, FeatureFlags)} instead
     */
    public ImsPhoneCallTracker makeImsPhoneCallTracker(ImsPhone imsPhone) {
        return new ImsPhoneCallTracker(imsPhone, ImsManager::getConnector);
        return makeImsPhoneCallTracker(imsPhone, new FeatureFlagsImpl());
    }

    /**
     * Create a ims phone call tracker.
     *
     * @param imsPhone imsphone
     * @param featureFlags feature flags
     * @return ImsPhoneCallTracker newly created ImsPhoneCallTracker
     */
    public ImsPhoneCallTracker makeImsPhoneCallTracker(ImsPhone imsPhone,
                                                       @NonNull FeatureFlags featureFlags) {
        return new ImsPhoneCallTracker(imsPhone, ImsManager::getConnector, featureFlags);
    }

    public ImsExternalCallTracker makeImsExternalCallTracker(ImsPhone imsPhone) {
+6 −1
Original line number Diff line number Diff line
@@ -2290,6 +2290,10 @@ 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())
@@ -3318,7 +3322,8 @@ public class DataNetwork extends StateMachine {
            TelephonyNetworkRequest networkRequest = mAttachedNetworkRequestList.get(0);
            DataProfile dataProfile = mDataNetworkController.getDataProfileManager()
                    .getDataProfileForNetworkRequest(networkRequest, targetNetworkType,
                            mPhone.getServiceState().isUsingNonTerrestrialNetwork(), false);
                            mPhone.getServiceState().isUsingNonTerrestrialNetwork(),
                            mDataNetworkController.isEsimBootStrapProvisioningActivated(), 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
+22 −1
Original line number Diff line number Diff line
@@ -101,6 +101,8 @@ 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;

@@ -1330,6 +1332,7 @@ 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
@@ -1494,7 +1497,8 @@ public class DataNetworkController extends Handler {
            evaluation.addDataAllowedReason(DataAllowedReason.EMERGENCY_REQUEST);
            evaluation.setCandidateDataProfile(mDataProfileManager.getDataProfileForNetworkRequest(
                    networkRequest, getDataNetworkType(transport),
                    mServiceState.isUsingNonTerrestrialNetwork(), true));
                    mServiceState.isUsingNonTerrestrialNetwork(),
                    isEsimBootStrapProvisioningActivated(), true));
            networkRequest.setEvaluation(evaluation);
            log(evaluation.toString());
            return evaluation;
@@ -1653,6 +1657,7 @@ 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());
@@ -2271,6 +2276,22 @@ 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.
     *
Loading