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

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

Snap for 13241370 from 5b8c2944 to 25Q2-release

Change-Id: I012a157b58f2aad22afa62d1b074ccbdc4bb4f4c
parents 4b2e942b 5b8c2944
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
package: "com.android.internal.telephony.flags"
container: "system"

# OWNER=linggm TARGET=25Q2
flag {
  name: "keep_ping_request"
  namespace: "telephony"
  description: "If ping test is not required to pass, keep the ping request to avoid deactivate followed by reactivate"
  bug: "366318732"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

# OWNER=linggm TARGET=25Q2
flag {
  name: "auto_data_switch_enhanced"
+2 −3
Original line number Diff line number Diff line
@@ -342,11 +342,10 @@ public class CellularNetworkValidator {
        if (mState == STATE_VALIDATING) {
            mValidationCallback.onValidationDone(passed, mSubId);
            mState = STATE_VALIDATED;
            boolean keepRequest = mFlags.keepPingRequest()
                    ? (passed || !mRequireTestPass) : (!mRequireTestPass && passed);
            boolean keepRequest = passed || !mRequireTestPass;
            // If validation passed and per request to NOT release after validation, delay cleanup.
            if (keepRequest) {
                mHandler.postDelayed(this::stopValidation, 500);
                mHandler.postDelayed(this::stopValidation, 5000);
            } else {
                stopValidation();
            }
+1 −1
Original line number Diff line number Diff line
@@ -1618,7 +1618,7 @@ public class PhoneSwitcher extends Handler {
        mSetOpptSubCallback = callback;
        long validationTimeout = getValidationTimeout(subIdToValidate, needValidation);
        mValidator.validate(subIdToValidate, validationTimeout,
                mFlags.keepPingRequest() && mPendingSwitchNeedValidation, mValidationCallback);
                mPendingSwitchNeedValidation, mValidationCallback);
    }

    private long getValidationTimeout(int subId, boolean needValidation) {
+0 −5
Original line number Diff line number Diff line
@@ -278,11 +278,6 @@ public class UiccController extends Handler {
        if (DBG) {
            logWithLocalLog("config_num_physical_slots = " + numPhysicalSlots);
        }
        // Minimum number of physical slot count should be equals to or greater than phone count,
        // if it is less than phone count use phone count as physical slot count.
        if (numPhysicalSlots < mCis.length) {
            numPhysicalSlots = mCis.length;
        }

        mTelephonyManager = mContext.getSystemService(TelephonyManager.class);

+10 −3
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package com.android.internal.telephony.data;

import static com.android.internal.telephony.TelephonyTestUtils.waitForMs;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -64,6 +62,7 @@ public class CellularNetworkValidatorTest extends TelephonyTest {
            new PhoneCapability(1, 1, null, true, new int[0]);
    private static final PhoneCapability CAPABILITY_WITHOUT_VALIDATION_SUPPORTED =
            new PhoneCapability(1, 1, null, false, new int[0]);
    private static final int CLEANUP_VALIDATION_TIMEOUT = 5010;
    private final CellIdentityLte mCellIdentityLte1 = new CellIdentityLte(123, 456, 0, 0, 111);
    private final CellIdentityLte mCellIdentityLte2 = new CellIdentityLte(321, 654, 0, 0, 222);

@@ -226,7 +225,7 @@ public class CellularNetworkValidatorTest extends TelephonyTest {

        // Mark mValidationCacheTtl to only 1 second.
        setCacheTtlInCarrierConfig(1000);
        waitForMs(1100);
        moveTimeForward(1100);

        resetStates();
        mValidatorUT.validate(subId, timeout, true, mCallback);
@@ -309,6 +308,8 @@ public class CellularNetworkValidatorTest extends TelephonyTest {
        mValidatorUT.validate(1, timeout, true, mCallback);
        mValidatorUT.mNetworkCallback.onCapabilitiesChanged(null, new NetworkCapabilities()
                .addCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED));
        moveTimeForward(CLEANUP_VALIDATION_TIMEOUT);
        processAllMessages();
        assertNetworkRecentlyValidated(1, true);

        // Change reg state to a different network.
@@ -340,6 +341,9 @@ public class CellularNetworkValidatorTest extends TelephonyTest {
            mValidatorUT.validate(subId, timeout, true, mCallback);
            mValidatorUT.mNetworkCallback.onCapabilitiesChanged(null, new NetworkCapabilities()
                    .addCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED));
            // release the request
            moveTimeForward(CLEANUP_VALIDATION_TIMEOUT);
            processAllMessages();
            assertNetworkRecentlyValidated(subId, true);
        }

@@ -457,6 +461,9 @@ public class CellularNetworkValidatorTest extends TelephonyTest {
    }

    private void assertValidationResult(int subId, boolean shouldPass) {
        // release the request
        moveTimeForward(CLEANUP_VALIDATION_TIMEOUT);
        processAllMessages();
        // Verify that validation is over.
        verify(mConnectivityManager).unregisterNetworkCallback(eq(mValidatorUT.mNetworkCallback));
        assertFalse(mValidatorUT.mHandler.hasMessagesOrCallbacks());
Loading