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

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

Snap for 10985023 from fc0029bd to 24Q1-release

Change-Id: Ib17eb7942134822be7af9b7683ede0163b8d5c51
parents 435e6dcd fc0029bd
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -726,6 +726,28 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
                CarrierConfigManager.KEY_PREVENT_CLIR_ACTIVATION_AND_DEACTIVATION_CODE_BOOL);
    }

    /**
     * Determines if the carrier prefers to use an in service sim for a normal routed emergency
     * call.
     * @return true when carrier config
     * {@link CarrierConfigManager#KEY_PREFER_IN_SERVICE_SIM_FOR_NORMAL_ROUTED_EMERGENCY_CALLS_BOOL}
     * is true.
     */
    public boolean shouldPreferInServiceSimForNormalRoutedEmergencyCall() {
        CarrierConfigManager configManager = (CarrierConfigManager)
                getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
        PersistableBundle b = configManager.getConfigForSubId(getSubId(), CarrierConfigManager
                .KEY_PREFER_IN_SERVICE_SIM_FOR_NORMAL_ROUTED_EMERGENCY_CALLS_BOOL);
        if (b != null) {
            return b.getBoolean(CarrierConfigManager
                            .KEY_PREFER_IN_SERVICE_SIM_FOR_NORMAL_ROUTED_EMERGENCY_CALLS_BOOL,
                    false);
        } else {
            // Default value set in CarrierConfigManager
            return false;
        }
    }

    /**
     * When overridden the derived class needs to call
     * super.handleMessage(msg) so this method has a
+4 −0
Original line number Diff line number Diff line
@@ -983,8 +983,11 @@ public class RILUtils {
        dpi.persistent = dp.isPersistent();
        dpi.preferred = dp.isPreferred();
        dpi.alwaysOn = false;
        dpi.infrastructureBitmap = android.hardware.radio.data.DataProfileInfo
                .INFRASTRUCTURE_CELLULAR;
        if (dp.getApnSetting() != null) {
            dpi.alwaysOn = dp.getApnSetting().isAlwaysOn();
            dpi.infrastructureBitmap = dp.getApnSetting().getInfrastructureBitmask();
        }
        dpi.trafficDescriptor = convertToHalTrafficDescriptorAidl(dp.getTrafficDescriptor());

@@ -1022,6 +1025,7 @@ public class RILUtils {
                .setRoamingProtocol(dpi.roamingProtocol)
                .setUser(dpi.user)
                .setAlwaysOn(dpi.alwaysOn)
                .setInfrastructureBitmask(dpi.infrastructureBitmap)
                .build();

        TrafficDescriptor td;
+3 −1
Original line number Diff line number Diff line
@@ -498,15 +498,17 @@ public class TelephonyComponentFactory {
     * @param dataServiceManager Data service manager instance.
     * @param looper The looper to be used by the handler. Currently the handler thread is the phone
     * process's main thread.
     * @param featureFlags Feature flags controlling which feature is enabled.     *
     * @param callback Callback for passing events back to data network controller.
     * @return The data profile manager instance.
     */
    public @NonNull DataProfileManager makeDataProfileManager(@NonNull Phone phone,
            @NonNull DataNetworkController dataNetworkController,
            @NonNull DataServiceManager dataServiceManager, @NonNull Looper looper,
            @NonNull FeatureFlags featureFlags,
            @NonNull DataProfileManager.DataProfileManagerCallback callback) {
        return new DataProfileManager(phone, dataNetworkController, dataServiceManager, looper,
                callback);
                featureFlags, callback);
    }

    /**
+2 −1
Original line number Diff line number Diff line
@@ -3308,7 +3308,8 @@ public class DataNetwork extends StateMachine {
                && !mAttachedNetworkRequestList.isEmpty()) {
            TelephonyNetworkRequest networkRequest = mAttachedNetworkRequestList.get(0);
            DataProfile dataProfile = mDataNetworkController.getDataProfileManager()
                    .getDataProfileForNetworkRequest(networkRequest, targetNetworkType, false);
                    .getDataProfileForNetworkRequest(networkRequest, targetNetworkType,
                            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
+5 −1
Original line number Diff line number Diff line
@@ -879,6 +879,7 @@ public class DataNetworkController extends Handler {
                DataProfileManager.class.getName())
                .makeDataProfileManager(mPhone, this, mDataServiceManagers
                                .get(AccessNetworkConstants.TRANSPORT_TYPE_WWAN), looper,
                        mFeatureFlags,
                        new DataProfileManagerCallback(this::post) {
                            @Override
                            public void onDataProfilesChanged() {
@@ -1328,6 +1329,7 @@ public class DataNetworkController extends Handler {
                DataProfile candidate = mDataProfileManager
                        .getDataProfileForNetworkRequest(requestList.getFirst(),
                                TelephonyManager.NETWORK_TYPE_IWLAN,
                                mServiceState.isUsingNonTerrestrialNetwork(),
                                false/*ignorePermanentFailure*/);
                if (candidate != null && !dataNetwork.getDataProfile().equals(candidate)) {
                    logv("But skipped because found better data profile " + candidate
@@ -1491,7 +1493,8 @@ public class DataNetworkController extends Handler {
        if (networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_EIMS)) {
            evaluation.addDataAllowedReason(DataAllowedReason.EMERGENCY_REQUEST);
            evaluation.setCandidateDataProfile(mDataProfileManager.getDataProfileForNetworkRequest(
                    networkRequest, getDataNetworkType(transport), true));
                    networkRequest, getDataNetworkType(transport),
                    mServiceState.isUsingNonTerrestrialNetwork(), true));
            networkRequest.setEvaluation(evaluation);
            log(evaluation.toString());
            return evaluation;
@@ -1647,6 +1650,7 @@ public class DataNetworkController extends Handler {
        }
        DataProfile dataProfile = mDataProfileManager
                .getDataProfileForNetworkRequest(networkRequest, networkType,
                        mServiceState.isUsingNonTerrestrialNetwork(),
                        // If the evaluation is due to environmental changes, then we should ignore
                        // the permanent failure reached earlier.
                        reason.isConditionBased());
Loading