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

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

Snap for 13277861 from cd57af52 to 25Q3-release

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

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

    static {
+9 −1
Original line number Diff line number Diff line
@@ -236,7 +236,15 @@ public class TelephonyCountryDetector extends Handler {
        }

        List<String> result = new ArrayList<>();
        for (Phone phone : PhoneFactory.getPhones()) {
        Phone[] phones;
        try {
            phones = PhoneFactory.getPhones();
        } catch (IllegalStateException e) {
            logd("getCurrentNetworkCountryIso: PhoneFactory.getPhones() failed, e=" + e);
            return result;
        }

        for (Phone phone : phones) {
            String countryIso = getNetworkCountryIsoForPhone(phone);
            if (isValid(countryIso)) {
                String countryIsoInUpperCase = countryIso.toUpperCase(Locale.US);
+19 −4
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ import com.android.internal.telephony.PhoneFactory;
import com.android.internal.telephony.flags.FeatureFlags;
import com.android.internal.telephony.satellite.metrics.SessionMetricsStats;
import com.android.internal.telephony.util.ArrayUtils;
import com.android.internal.util.IState;
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;
import com.android.telephony.Rlog;
@@ -623,8 +624,15 @@ public class SatelliteSessionController extends StateMachine {
     * @return {@code true} if state machine is in enabling state and {@code false} otherwise.
     */
    public boolean isInEnablingState() {
        if (DBG) plogd("isInEnablingState: getCurrentState=" + getCurrentState());
        return getCurrentState() == mEnablingState;
        try {
            IState currentState = getCurrentState();
            if (DBG) plogd("isInEnablingState: getCurrentState=" + currentState);
            return currentState == mEnablingState;
        } catch (Exception e) {
            plogw("isInEnablingState: Exception: " + e
                + ", mCurrentState=" + mCurrentState);
            return mCurrentState == SatelliteManager.SATELLITE_MODEM_STATE_ENABLING_SATELLITE;
        }
    }

    /**
@@ -633,8 +641,15 @@ public class SatelliteSessionController extends StateMachine {
     * @return {@code true} if state machine is in disabling state and {@code false} otherwise.
     */
    public boolean isInDisablingState() {
        if (DBG) plogd("isInDisablingState: getCurrentState=" + getCurrentState());
        return getCurrentState() == mDisablingState;
        try {
            IState currentState = getCurrentState();
            if (DBG) plogd("isInDisablingState: getCurrentState=" + currentState);
            return currentState == mDisablingState;
        } catch (Exception e) {
            plogw("isInDisablingState: Exception: " + e
                + ", mCurrentState=" + mCurrentState);
            return mCurrentState == SatelliteManager.SATELLITE_MODEM_STATE_DISABLING_SATELLITE;
        }
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -1665,7 +1665,7 @@ public class UiccController extends Handler {
    }

    private boolean isValidPhoneIndex(int index) {
        return (index >= 0 && index < TelephonyManager.getDefault().getPhoneCount());
        return (index >= 0 && index < mTelephonyManager.getActiveModemCount());
    }

    private boolean isValidSlotIndex(int index) {
@@ -1673,7 +1673,7 @@ public class UiccController extends Handler {
    }

    private boolean isShuttingDown() {
        for (int i = 0; i < TelephonyManager.getDefault().getActiveModemCount(); i++) {
        for (int i = 0; i < mTelephonyManager.getActiveModemCount(); i++) {
            if (PhoneFactory.getPhone(i) != null &&
                    PhoneFactory.getPhone(i).isShuttingDown()) {
                return true;
+1 −4
Original line number Diff line number Diff line
@@ -56,9 +56,7 @@ public class MccTableTest {

    @Parameterized.Parameters(name = "{0}")
    public static List<FlagsParameterization> getParams() {
        return FlagsParameterization.allCombinationsOf(
                Flags.FLAG_USE_I18N_FOR_MCC_MAPPING,
                com.android.icu.Flags.FLAG_TELEPHONY_LOOKUP_MCC_EXTENSION);
        return FlagsParameterization.allCombinationsOf(Flags.FLAG_USE_I18N_FOR_MCC_MAPPING);
    }

    @Rule
@@ -155,7 +153,6 @@ public class MccTableTest {
    @Test
    public void telephonyFinder_shouldBeIdenticalToTelephonyMccTable() {
        assumeTrue(Flags.useI18nForMccMapping());
        assumeTrue(com.android.icu.Flags.telephonyLookupMccExtension());

        TelephonyNetworkFinder telephonyNetworkFinder =
                TelephonyLookup.getInstance().getTelephonyNetworkFinder();
Loading