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

Commit 27ff4071 authored by Jack Yu's avatar Jack Yu
Browse files

Correctly support LTE carrier aggregation

NetworkRegistrationInfo.getAccessNetworkTechnology() should
report LTE as the network type when modem reports the RAT
LTE_CA. Fixed by adding a flag in data specific registration
info.

Test: Manual
Bug: 129707180
Merged-In: Ib152f97711441fded998a36528ef007f9e28ccbf
Change-Id: Ib152f97711441fded998a36528ef007f9e28ccbf
(cherry picked from commit 05a65432)
parent 2d9b4fae
Loading
Loading
Loading
Loading
+17 −4
Original line number Diff line number Diff line
@@ -73,17 +73,26 @@ public final class DataSpecificRegistrationInfo implements Parcelable {
     */
    private final LteVopsSupportInfo mLteVopsSupportInfo;

    /**
     * Indicates if it's using carrier aggregation
     *
     * @hide
     */
    public final boolean isUsingCarrierAggregation;

    /**
     * @hide
     */
    DataSpecificRegistrationInfo(
            int maxDataCalls, boolean isDcNrRestricted, boolean isNrAvailable,
            boolean isEnDcAvailable, LteVopsSupportInfo lteVops) {
            boolean isEnDcAvailable, LteVopsSupportInfo lteVops,
            boolean isUsingCarrierAggregation) {
        this.maxDataCalls = maxDataCalls;
        this.isDcNrRestricted = isDcNrRestricted;
        this.isNrAvailable = isNrAvailable;
        this.isEnDcAvailable = isEnDcAvailable;
        this.mLteVopsSupportInfo = lteVops;
        this.isUsingCarrierAggregation = isUsingCarrierAggregation;
    }

    private DataSpecificRegistrationInfo(Parcel source) {
@@ -92,6 +101,7 @@ public final class DataSpecificRegistrationInfo implements Parcelable {
        isNrAvailable = source.readBoolean();
        isEnDcAvailable = source.readBoolean();
        mLteVopsSupportInfo = LteVopsSupportInfo.CREATOR.createFromParcel(source);
        isUsingCarrierAggregation = source.readBoolean();
    }

    @Override
@@ -101,6 +111,7 @@ public final class DataSpecificRegistrationInfo implements Parcelable {
        dest.writeBoolean(isNrAvailable);
        dest.writeBoolean(isEnDcAvailable);
        mLteVopsSupportInfo.writeToParcel(dest, flags);
        dest.writeBoolean(isUsingCarrierAggregation);
    }

    @Override
@@ -116,7 +127,8 @@ public final class DataSpecificRegistrationInfo implements Parcelable {
                .append(" isDcNrRestricted = " + isDcNrRestricted)
                .append(" isNrAvailable = " + isNrAvailable)
                .append(" isEnDcAvailable = " + isEnDcAvailable)
                .append(mLteVopsSupportInfo.toString())
                .append(" " + mLteVopsSupportInfo.toString())
                .append(" isUsingCarrierAggregation = " + isUsingCarrierAggregation)
                .append(" }")
                .toString();
    }
@@ -124,7 +136,7 @@ public final class DataSpecificRegistrationInfo implements Parcelable {
    @Override
    public int hashCode() {
        return Objects.hash(maxDataCalls, isDcNrRestricted, isNrAvailable, isEnDcAvailable,
                mLteVopsSupportInfo);
                mLteVopsSupportInfo, isUsingCarrierAggregation);
    }

    @Override
@@ -138,7 +150,8 @@ public final class DataSpecificRegistrationInfo implements Parcelable {
                && this.isDcNrRestricted == other.isDcNrRestricted
                && this.isNrAvailable == other.isNrAvailable
                && this.isEnDcAvailable == other.isEnDcAvailable
                && this.mLteVopsSupportInfo.equals(other.mLteVopsSupportInfo);
                && this.mLteVopsSupportInfo.equals(other.mLteVopsSupportInfo)
                && this.isUsingCarrierAggregation == other.isUsingCarrierAggregation;
    }

    public static final @NonNull Parcelable.Creator<DataSpecificRegistrationInfo> CREATOR =
+4 −3
Original line number Diff line number Diff line
@@ -251,12 +251,13 @@ public final class NetworkRegistrationInfo implements Parcelable {
                                   @Nullable CellIdentity cellIdentity, int maxDataCalls,
                                   boolean isDcNrRestricted, boolean isNrAvailable,
                                   boolean isEndcAvailable,
                                   LteVopsSupportInfo lteVopsSupportInfo) {
                                   LteVopsSupportInfo lteVopsSupportInfo,
                                   boolean isUsingCarrierAggregation) {
        this(domain, transportType, registrationState, accessNetworkTechnology, rejectCause,
                emergencyOnly, availableServices, cellIdentity);

        mDataSpecificInfo = new DataSpecificRegistrationInfo(
                maxDataCalls, isDcNrRestricted, isNrAvailable, isEndcAvailable, lteVopsSupportInfo);
                maxDataCalls, isDcNrRestricted, isNrAvailable, isEndcAvailable, lteVopsSupportInfo,
                isUsingCarrierAggregation);
        updateNrState(mDataSpecificInfo);
    }