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

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

Snap for 6538416 from f8462eb1 to rvc-release

Change-Id: I7c221db32c7748a91d7d8eb1df73c3133e27b6b7
parents 6b613452 f8462eb1
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -355,14 +355,8 @@ public class CellularNetworkService extends NetworkService {
            List<Integer> availableServices = getAvailableServices(
                    regState, domain, emergencyOnly);

            // In earlier versions of the HAL, LTE_CA was allowed to indicate that the device
            // is on CA; however, that has been superseded by the PHYSICAL_CHANNEL_CONFIG signal.
            // Because some vendors provide both NETWORK_TYPE_LTE_CA *and* PHYSICAL_CHANNEL_CONFIG,
            // this tweak is left for compatibility; however, the network type is no longer allowed
            // to be used to declare that carrier aggregation is in effect, because the other
            // signal provides a much richer information set, and we want to mitigate confusion in
            // how CA information is being provided.
            if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) {
                isUsingCarrierAggregation = true;
                networkType = TelephonyManager.NETWORK_TYPE_LTE;
            }

@@ -388,9 +382,14 @@ public class CellularNetworkService extends NetworkService {

            // Network Type fixup for carrier aggregation
            int networkType = ServiceState.rilRadioTechnologyToNetworkType(regResult.rat);
            boolean isUsingCarrierAggregation = false;
            // In earlier versions of the HAL, LTE_CA was allowed to indicate that the device
            // is on CA; however, that has been superseded by the PHYSICAL_CHANNEL_CONFIG signal.
            // Because some vendors provide both NETWORK_TYPE_LTE_CA *and* PHYSICAL_CHANNEL_CONFIG,
            // this tweak is left for compatibility; however, the network type is no longer allowed
            // to be used to declare that carrier aggregation is in effect, because the other
            // signal provides a much richer information set, and we want to mitigate confusion in
            // how CA information is being provided.
            if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) {
                isUsingCarrierAggregation = true;
                networkType = TelephonyManager.NETWORK_TYPE_LTE;
            }

@@ -449,7 +448,7 @@ public class CellularNetworkService extends NetworkService {
                    return new NetworkRegistrationInfo(domain, transportType, regState, networkType,
                            reasonForDenial, isEmergencyOnly, availableServices, cellIdentity,
                            rplmn, MAX_DATA_CALLS, isDcNrRestricted, isNrAvailable, isEndcAvailable,
                            vopsInfo, isUsingCarrierAggregation);
                            vopsInfo, false /* isUsingCarrierAggregation */);
            }
        }

+20 −5
Original line number Diff line number Diff line
@@ -435,6 +435,9 @@ public class NetworkTypeController extends StateMachine {
                case EVENT_PHYSICAL_CHANNEL_CONFIG_NOTIF_CHANGED:
                    AsyncResult result = (AsyncResult) msg.obj;
                    mIsPhysicalChannelConfigOn = (boolean) result.result;
                    if (DBG) {
                        log("mIsPhysicalChannelConfigOn changed to: " + mIsPhysicalChannelConfigOn);
                    }
                    for (int event : ALL_EVENTS) {
                        removeMessages(event);
                    }
@@ -689,10 +692,16 @@ public class NetworkTypeController extends StateMachine {
                    }
                    break;
                case EVENT_NR_FREQUENCY_CHANGED:
                    if (!isNrConnected()) {
                        log("The nr state was changed. To update the state.");
                        sendMessage(EVENT_NR_STATE_CHANGED);
                    }
                    if (!isNrMmwave()) {
                        // STATE_CONNECTED_MMWAVE -> STATE_CONNECTED
                        transitionWithTimerTo(mNrConnectedState);
                    } else {
                        updateOverrideNetworkType();
                        // STATE_CONNECTED -> STATE_CONNECTED_MMWAVE
                        transitionTo(mNrConnectedState);
                    }
                    break;
                case EVENT_DATA_ACTIVITY_CHANGED:
@@ -747,21 +756,27 @@ public class NetworkTypeController extends StateMachine {

    private void transitionToCurrentState() {
        int dataRat = mPhone.getServiceState().getDataNetworkType();
        IState transitionState;
        if (dataRat == TelephonyManager.NETWORK_TYPE_NR || isNrConnected()) {
            transitionTo(mNrConnectedState);
            transitionState = mNrConnectedState;
            mPreviousState = isNrMmwave() ? STATE_CONNECTED_MMWAVE : STATE_CONNECTED;
        } else if (isLte(dataRat) && isNrNotRestricted()) {
            if (isDataActive()) {
                transitionTo(mLteConnectedState);
                transitionState = mLteConnectedState;
                mPreviousState = STATE_NOT_RESTRICTED_RRC_CON;
            } else {
                transitionTo(mIdleState);
                transitionState = mIdleState;
                mPreviousState = STATE_NOT_RESTRICTED_RRC_IDLE;
            }
        } else {
            transitionTo(mLegacyState);
            transitionState = mLegacyState;
            mPreviousState = isNrRestricted() ? STATE_RESTRICTED : STATE_LEGACY;
        }
        if (!transitionState.equals(getCurrentState())) {
            transitionTo(transitionState);
        } else {
            updateOverrideNetworkType();
        }
    }

    private void updateTimers() {
+4 −4
Original line number Diff line number Diff line
@@ -1619,14 +1619,14 @@ public class ServiceStateTracker extends Handler {
                    mPhone.notifyPhysicalChannelConfiguration(list);
                    mLastPhysicalChannelConfigList = list;
                    boolean hasChanged = false;
                    if (updateNrFrequencyRangeFromPhysicalChannelConfigs(list, mSS)) {
                        mNrFrequencyChangedRegistrants.notifyRegistrants();
                        hasChanged = true;
                    }
                    if (updateNrStateFromPhysicalChannelConfigs(list, mSS)) {
                        mNrStateChangedRegistrants.notifyRegistrants();
                        hasChanged = true;
                    }
                    if (updateNrFrequencyRangeFromPhysicalChannelConfigs(list, mSS)) {
                        mNrFrequencyChangedRegistrants.notifyRegistrants();
                        hasChanged = true;
                    }
                    hasChanged |= RatRatcheter
                            .updateBandwidths(getBandwidthsFromConfigs(list), mSS);

+16 −1
Original line number Diff line number Diff line
@@ -694,11 +694,26 @@ public class DataConnection extends StateMachine {
        // old modem backward compatibility).
        boolean isModemRoaming = mPhone.getServiceState().getDataRoamingFromRegistration();

        // If the apn is NOT metered, we will allow data roaming regardless of the setting.
        boolean isUnmeteredApnType = !ApnSettingUtils.isMeteredApnType(
                cp.mApnContext.getApnTypeBitmask(), mPhone);

        // Set this flag to true if the user turns on data roaming. Or if we override the roaming
        // state in framework, we should set this flag to true as well so the modem will not reject
        // the data call setup (because the modem actually thinks the device is roaming).
        boolean allowRoaming = mPhone.getDataRoamingEnabled()
                || (isModemRoaming && !mPhone.getServiceState().getDataRoaming());
                || (isModemRoaming && (!mPhone.getServiceState().getDataRoaming()
                || isUnmeteredApnType));

        if (DBG) {
            log("allowRoaming=" + allowRoaming
                    + ", mPhone.getDataRoamingEnabled()=" + mPhone.getDataRoamingEnabled()
                    + ", isModemRoaming=" + isModemRoaming
                    + ", mPhone.getServiceState().getDataRoaming()="
                    + mPhone.getServiceState().getDataRoaming()
                    + ", isUnmeteredApnType=" + isUnmeteredApnType
            );
        }

        // Check if this data setup is a handover.
        LinkProperties linkProperties = null;
+12 −0
Original line number Diff line number Diff line
@@ -274,6 +274,10 @@ public class EuiccController extends IEuiccController.Stub {
     */
    @Override
    public void setSupportedCountries(boolean isSupported, @NonNull List<String> countriesList) {
        if (!callerCanWriteEmbeddedSubscriptions()) {
            throw new SecurityException(
                    "Must have WRITE_EMBEDDED_SUBSCRIPTIONS to set supported countries");
        }
        if (isSupported) {
            mSupportedCountries = countriesList;
        } else {
@@ -294,6 +298,10 @@ public class EuiccController extends IEuiccController.Stub {
    @Override
    @NonNull
    public List<String> getSupportedCountries(boolean isSupported) {
        if (!callerCanWriteEmbeddedSubscriptions()) {
            throw new SecurityException(
                    "Must have WRITE_EMBEDDED_SUBSCRIPTIONS to get supported countries");
        }
        if (isSupported && mSupportedCountries != null) {
            return mSupportedCountries;
        } else if (!isSupported && mUnsupportedCountries != null) {
@@ -320,6 +328,10 @@ public class EuiccController extends IEuiccController.Stub {
     */
    @Override
    public boolean isSupportedCountry(@NonNull String countryIso) {
        if (!callerCanWriteEmbeddedSubscriptions()) {
            throw new SecurityException(
                    "Must have WRITE_EMBEDDED_SUBSCRIPTIONS to check if the country is supported");
        }
        if (mSupportedCountries == null || mSupportedCountries.isEmpty()) {
            Log.i(TAG, "Using blacklist unsupportedCountries=" + mUnsupportedCountries);
            return !isEsimUnsupportedCountry(countryIso);
Loading