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

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

Snap for 13304896 from 8f915bfe to 25Q3-release

Change-Id: I1aaddd4ddd570cc8afdd715b7a4f5563c9f14d7c
parents f4085d01 8f915bfe
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -336,7 +336,8 @@ public final class MccTable {
    public static final Map<Locale, Locale> FALLBACKS = new HashMap<Locale, Locale>();

    public static boolean isNewMccTableEnabled() {
        return com.android.internal.telephony.flags.Flags.useI18nForMccMapping();
        return com.android.icu.Flags.telephonyLookupMccExtension()
                && com.android.internal.telephony.flags.Flags.useI18nForMccMapping();
    }

    static {
+1 −0
Original line number Diff line number Diff line
@@ -5781,6 +5781,7 @@ public class RILUtils {
            case ImsRegistrationImplBase.REGISTRATION_TECH_LTE:
                return android.hardware.radio.AccessNetwork.EUTRAN;
            case ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN:
            case ImsRegistrationImplBase.REGISTRATION_TECH_CROSS_SIM:
                return android.hardware.radio.AccessNetwork.IWLAN;
            case ImsRegistrationImplBase.REGISTRATION_TECH_NR:
                return android.hardware.radio.AccessNetwork.NGRAN;
+7 −3
Original line number Diff line number Diff line
@@ -776,14 +776,18 @@ public class AutoDataSwitchController extends Handler {
                                    .getRatSignalScore();
                            int currentScore = mPhonesSignalStatus[preferredPhoneId]
                                    .getRatSignalScore();
                            if (defaultScore >= currentScore) {
                            if ((currentScore - defaultScore) <= mScoreTolerance) {
                                debugMessage
                                        .append(", back to default for higher or equal score ")
                                        .append(", back to default for score ")
                                        .append(defaultScore).append(" versus current ")
                                        .append(currentScore);
                                backToDefault = true;
                                switchType = STABILITY_CHECK_PERFORMANCE_SWITCH;
                                needValidation = mRequirePingTestBeforeSwitch;
                            } else {
                                debugMessage.append(", default's score ").append(defaultScore)
                                        .append(" doesn't justify the switch given the current ")
                                        .append(currentScore);
                            }
                        } else {
                            // Only OOS/in service switch is enabled, switch back.
@@ -800,8 +804,8 @@ public class AutoDataSwitchController extends Handler {
                }
            }

            if (backToDefault) {
            log(debugMessage.toString());
            if (backToDefault) {
                mSelectedTargetPhoneId = defaultDataPhoneId;
                startStabilityCheck(DEFAULT_PHONE_INDEX, switchType, needValidation);
            } else {
+4 −8
Original line number Diff line number Diff line
@@ -147,8 +147,7 @@ public class ControllerMetricsStats {
            } else if (datagramType == SatelliteManager.DATAGRAM_TYPE_KEEP_ALIVE) {
                builder.setCountOfDatagramTypeKeepAliveSuccess(ADD_COUNT).build();
            } else if (datagramType == SatelliteManager.DATAGRAM_TYPE_SMS) {
                builder.setCountOfDatagramTypeSosSmsSuccess(ADD_COUNT)
                        .setCountOfOutgoingDatagramTypeSmsSuccess(ADD_COUNT);
                builder.setCountOfOutgoingDatagramTypeSmsSuccess(ADD_COUNT);
            }
        }

@@ -174,8 +173,7 @@ public class ControllerMetricsStats {
            } else if (datagramType == SatelliteManager.DATAGRAM_TYPE_KEEP_ALIVE) {
                builder.setCountOfDatagramTypeKeepAliveFail(ADD_COUNT);
            } else if (datagramType == SatelliteManager.DATAGRAM_TYPE_SMS) {
                builder.setCountOfDatagramTypeSosSmsFail(ADD_COUNT)
                        .setCountOfOutgoingDatagramTypeSmsFail(ADD_COUNT);
                builder.setCountOfOutgoingDatagramTypeSmsFail(ADD_COUNT);
            }
        }

@@ -216,11 +214,9 @@ public class ControllerMetricsStats {
        SatelliteStats.SatelliteControllerParams.Builder builder =
                new SatelliteStats.SatelliteControllerParams.Builder();
        if (result == SatelliteManager.SATELLITE_RESULT_SUCCESS) {
            builder.setCountOfIncomingDatagramTypeSosSmsSuccess(ADD_COUNT)
                    .setCountOfIncomingDatagramTypeSmsSuccess(ADD_COUNT);
            builder.setCountOfIncomingDatagramTypeSmsSuccess(ADD_COUNT);
        } else {
            builder.setCountOfIncomingDatagramTypeSosSmsFail(ADD_COUNT)
                    .setCountOfIncomingDatagramTypeSmsFail(ADD_COUNT);
            builder.setCountOfIncomingDatagramTypeSmsFail(ADD_COUNT);
        }
        SatelliteStats.SatelliteControllerParams  controllerParam = builder.build();
        logd("reportIncomingNtnSmsCount(): " + controllerParam);
+30 −11
Original line number Diff line number Diff line
@@ -141,6 +141,8 @@ import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
@@ -157,9 +159,6 @@ public class SubscriptionManagerService extends ISub.Stub {
    private static final int CHECK_BOOTSTRAP_TIMER_IN_MS = 20 * 60 * 1000; // 20 minutes
    private static CountDownTimer bootstrapProvisioningTimer;

    /** Whether enabling verbose debugging message or not. */
    private static final boolean VDBG = false;

    /**
     * The columns in {@link SimInfo} table that can be directly accessed through
     * {@link #getSubscriptionProperty(int, String, String, String)} or
@@ -235,6 +234,11 @@ public class SubscriptionManagerService extends ISub.Stub {
    @NonNull
    private static final BinderWrapper BINDER_WRAPPER = new BinderWrapper();

    /** Regular expression to determine if a string is in MAC address format. */
    private static final Pattern MAC_ADDRESS_PATTERN = Pattern.compile(
            // Matches formats like 00:1B:44:11:3A:B7 or 00-1B-44-11-3A-B7
            "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$");

    /** Instance of subscription manager service. */
    @NonNull
    private static SubscriptionManagerService sInstance;
@@ -869,6 +873,22 @@ public class SubscriptionManagerService extends ISub.Stub {
        return result.build();
    }

    /**
     * Get the stripped ICCID, which sometimes ended with 'F'. Also not doing this if the ICCID
     * is MAC address (used by texting through bluetooth).
     *
     * @param iccId The original ICCID.
     * @return The fixed ICCID.
     */
    @VisibleForTesting
    @NonNull
    public static String getStrippedIccid(@NonNull String iccId) {
        Matcher matcher = MAC_ADDRESS_PATTERN.matcher(iccId);
        if (matcher.matches()) return iccId;

        return TextUtils.emptyIfNull(IccUtils.stripTrailingFs(iccId));
    }

    /**
     * @return The list of ICCIDs from the inserted physical SIMs.
     */
@@ -884,7 +904,7 @@ public class SubscriptionManagerService extends ISub.Stub {
                // Non euicc slots will have single port, so use default port index.
                String iccId = uiccSlot.getIccId(TelephonyManager.DEFAULT_PORT_INDEX);
                if (!TextUtils.isEmpty(iccId)) {
                    iccidList.add(IccUtils.stripTrailingFs(iccId));
                    iccidList.add(getStrippedIccid(iccId));
                }
            }
        }
@@ -1393,7 +1413,7 @@ public class SubscriptionManagerService extends ISub.Stub {
        }

        SubscriptionInfoInternal subInfo = mSubscriptionDatabaseManager
                .getSubscriptionInfoInternalByIccId(IccUtils.stripTrailingFs(iccId));
                .getSubscriptionInfoInternalByIccId(getStrippedIccid(iccId));
        return subInfo != null && subInfo.areUiccApplicationsEnabled();
    }

@@ -1407,8 +1427,7 @@ public class SubscriptionManagerService extends ISub.Stub {
    @NonNull
    private String getIccId(int phoneId) {
        UiccPort port = mUiccController.getUiccPort(phoneId);
        return (port == null) ? "" : TextUtils.emptyIfNull(
                IccUtils.stripTrailingFs(port.getIccId()));
        return (port == null) ? "" : getStrippedIccid(port.getIccId());
    }

    /**
@@ -2018,7 +2037,7 @@ public class SubscriptionManagerService extends ISub.Stub {

        final long identity = Binder.clearCallingIdentity();
        try {
            iccId = IccUtils.stripTrailingFs(iccId);
            iccId = getStrippedIccid(iccId);
            SubscriptionInfoInternal subInfo = mSubscriptionDatabaseManager
                    .getSubscriptionInfoInternalByIccId(iccId);

@@ -2352,7 +2371,7 @@ public class SubscriptionManagerService extends ISub.Stub {
                return -1;
            }

            iccId = IccUtils.stripTrailingFs(iccId);
            iccId = getStrippedIccid(iccId);
            SubscriptionInfoInternal subInfo = mSubscriptionDatabaseManager
                    .getSubscriptionInfoInternalByIccId(iccId);

@@ -4457,7 +4476,7 @@ public class SubscriptionManagerService extends ISub.Stub {
                // When port is inactive, sometimes valid iccid is present in the slot status,
                // hence update the portIndex. (Pre-U behavior)
                SubscriptionInfoInternal subInfo = mSubscriptionDatabaseManager
                        .getSubscriptionInfoInternalByIccId(IccUtils.stripTrailingFs(iccId));
                        .getSubscriptionInfoInternalByIccId(getStrippedIccid(iccId));
                int subId;
                if (subInfo != null) {
                    subId = subInfo.getSubscriptionId();
@@ -4466,7 +4485,7 @@ public class SubscriptionManagerService extends ISub.Stub {
                } else {
                    // If iccId is new, add a subscription record in the database so it can be
                    // activated later. (Pre-U behavior)
                    subId = insertSubscriptionInfo(IccUtils.stripTrailingFs(iccId),
                    subId = insertSubscriptionInfo(getStrippedIccid(iccId),
                            SubscriptionManager.INVALID_SIM_SLOT_INDEX, "",
                            SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM);
                    mSubscriptionDatabaseManager.setDisplayName(subId,
Loading