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

Commit b3878b6e authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5991964 from 6c8f450d to qt-qpr2-release

Change-Id: I7cd3a255e174226b8176805c73fd0459b9b926c3
parents 1e604b28 6c8f450d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ public class CellularNetworkValidator {

    private int mState = STATE_IDLE;
    private int mSubId;
    private int mTimeoutInMs;
    private long mTimeoutInMs;
    private boolean mReleaseAfterValidation;

    private NetworkRequest mNetworkRequest;
@@ -114,7 +114,7 @@ public class CellularNetworkValidator {
    /**
     * API to start a validation
     */
    public synchronized void validate(int subId, int timeoutInMs,
    public synchronized void validate(int subId, long timeoutInMs,
            boolean releaseAfterValidation, ValidationCallback callback) {
        // If it's already validating the same subscription, do nothing.
        if (subId == mSubId) return;
+13 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.internal.telephony;

import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
import static android.telephony.CarrierConfigManager.KEY_DATA_SWITCH_VALIDATION_TIMEOUT_LONG;
import static android.telephony.SubscriptionManager.DEFAULT_SUBSCRIPTION_ID;
import static android.telephony.SubscriptionManager.INVALID_PHONE_INDEX;
import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID;
@@ -41,10 +42,12 @@ import android.os.AsyncResult;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.PersistableBundle;
import android.os.Registrant;
import android.os.RegistrantList;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.telephony.CarrierConfigManager;
import android.telephony.PhoneCapability;
import android.telephony.PhoneStateListener;
import android.telephony.Rlog;
@@ -1162,8 +1165,16 @@ public class PhoneSwitcher extends Handler {
        // start validation on the subscription first.
        if (mValidator.isValidationFeatureSupported() && needValidation) {
            mSetOpptSubCallback = callback;
            mValidator.validate(subIdToValidate, DEFAULT_VALIDATION_EXPIRATION_TIME,
                    false, mValidationCallback);
            long validationTimeout = DEFAULT_VALIDATION_EXPIRATION_TIME;
            CarrierConfigManager configManager = (CarrierConfigManager)
                    mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);
            if (configManager != null) {
                PersistableBundle b = configManager.getConfigForSubId(subIdToValidate);
                if (b != null) {
                    validationTimeout = b.getLong(KEY_DATA_SWITCH_VALIDATION_TIMEOUT_LONG);
                }
            }
            mValidator.validate(subIdToValidate, validationTimeout, false, mValidationCallback);
        } else {
            setOpportunisticSubscriptionInternal(subId);
            sendSetOpptCallbackHelper(callback, SET_OPPORTUNISTIC_SUB_SUCCESS);
+3 −2
Original line number Diff line number Diff line
@@ -1562,10 +1562,11 @@ public class ServiceStateTracker extends Handler {
                        mNrStateChangedRegistrants.notifyRegistrants();
                        hasChanged = true;
                    }
                    hasChanged |= RatRatcheter
                            .updateBandwidths(getBandwidthsFromConfigs(list), mSS);

                    // Notify NR frequency, NR connection status or bandwidths changed.
                    if (hasChanged
                            || RatRatcheter.updateBandwidths(getBandwidthsFromConfigs(list), mSS)) {
                    if (hasChanged) {
                        mPhone.notifyServiceStateChanged(mSS);
                    }
                }
+2 −5
Original line number Diff line number Diff line
@@ -1381,11 +1381,8 @@ public class DcTracker extends Handler {
        // At this point, if data is not allowed, it must be because of the soft reasons. We
        // should start to check some special conditions that data will be allowed.
        if (!reasons.allowed()) {
            // If the device is on IWLAN, then all data should be unmetered. Check if the transport
            // is WLAN (for AP-assisted mode devices), or RAT equals IWLAN (for legacy mode devices)
            if (mTransportType == AccessNetworkConstants.TRANSPORT_TYPE_WLAN
                    || (mPhone.getTransportManager().isInLegacyMode()
                    && dataRat == ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN)) {
            // Check if the transport is WLAN ie wifi (for AP-assisted mode devices)
            if (mTransportType == AccessNetworkConstants.TRANSPORT_TYPE_WLAN) {
                reasons.add(DataAllowedReasonType.UNMETERED_APN);
            // Or if the data is on cellular, and the APN type is determined unmetered by the
            // configuration.