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

Commit 1cbcc50d authored by Jack Yu's avatar Jack Yu Committed by Gerrit Code Review
Browse files

Merge "Revert "Added documentation for network registration state""

parents 24eaa6ab 7e1be05b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4274,8 +4274,8 @@ package android.telephony {
    method public int[] getAvailableServices();
    method public android.telephony.CellIdentity getCellIdentity();
    method public int getDomain();
    method public int getReasonForDenial();
    method public int getRegState();
    method public int getRejectCause();
    method public int getTransportType();
    method public boolean isEmergencyEnabled();
    method public void writeToParcel(android.os.Parcel, int);
+41 −58
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.AccessNetworkConstants.TransportType;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -89,7 +88,7 @@ public class NetworkRegistrationState implements Parcelable {
    @Domain
    private final int mDomain;

    /** {@link TransportType} */
    /** {@link AccessNetworkConstants.TransportType}*/
    private final int mTransportType;

    @RegState
@@ -97,7 +96,7 @@ public class NetworkRegistrationState implements Parcelable {

    private final int mAccessNetworkTechnology;

    private final int mRejectCause;
    private final int mReasonForDenial;

    private final boolean mEmergencyOnly;

@@ -113,35 +112,22 @@ public class NetworkRegistrationState implements Parcelable {
    private DataSpecificRegistrationStates mDataSpecificStates;

    /**
     * @param domain Network domain. Must be a {@link Domain}. For {@link TransportType#WLAN}
     * transport, this must set to {@link #DOMAIN_PS}.
     * @param transportType Transport type. Must be one of the{@link TransportType}.
     * @param regState Network registration state. Must be one of the {@link RegState}. For
     * {@link TransportType#WLAN} transport, only {@link #REG_STATE_HOME} and
     * {@link #REG_STATE_NOT_REG_NOT_SEARCHING} are valid states.
     * @param accessNetworkTechnology Access network technology. Must be one of TelephonyManager
     * NETWORK_TYPE_XXXX. For {@link TransportType#WLAN} transport, set to
     * {@link TelephonyManager#NETWORK_TYPE_IWLAN}.
     * @param rejectCause Reason for denial if the registration state is {@link #REG_STATE_DENIED}.
     * Depending on {@code accessNetworkTechnology}, the values are defined in 3GPP TS 24.008
     * 10.5.3.6 for UMTS, 3GPP TS 24.301 9.9.3.9 for LTE, and 3GPP2 A.S0001 6.2.2.44 for CDMA. If
     * the reject cause is not supported or unknown, set it to 0.
     * // TODO: Add IWLAN reject cause reference
     * @param emergencyOnly True if this registration is for emergency only.
     * @param availableServices The list of the supported services. Each element must be one of
     * the {@link ServiceType}.
     * @param cellIdentity The identity representing a unique cell or wifi AP. Set to null if the
     * information is not available.
     * @param domain Network domain. Must be DOMAIN_CS or DOMAIN_PS.
     * @param transportType Transport type. Must be {@link AccessNetworkConstants.TransportType}
     * @param regState Network registration state.
     * @param accessNetworkTechnology See TelephonyManager NETWORK_TYPE_XXXX.
     * @param reasonForDenial Reason for denial if the registration state is DENIED.
     * @param availableServices The supported service.
     * @param cellIdentity The identity representing a unique cell
     */
    public NetworkRegistrationState(@Domain int domain, int transportType, @RegState int regState,
                                    int accessNetworkTechnology, int rejectCause,
                                    boolean emergencyOnly, int[] availableServices,
                                    @Nullable CellIdentity cellIdentity) {
    public NetworkRegistrationState(int domain, int transportType, int regState,
            int accessNetworkTechnology, int reasonForDenial, boolean emergencyOnly,
            int[] availableServices, @Nullable CellIdentity cellIdentity) {
        mDomain = domain;
        mTransportType = transportType;
        mRegState = regState;
        mAccessNetworkTechnology = accessNetworkTechnology;
        mRejectCause = rejectCause;
        mReasonForDenial = reasonForDenial;
        mAvailableServices = availableServices;
        mCellIdentity = cellIdentity;
        mEmergencyOnly = emergencyOnly;
@@ -152,13 +138,11 @@ public class NetworkRegistrationState implements Parcelable {
     * @hide
     */
    public NetworkRegistrationState(int domain, int transportType, int regState,
                                    int accessNetworkTechnology, int rejectCause,
                                    boolean emergencyOnly, int[] availableServices,
                                    @Nullable CellIdentity cellIdentity, boolean cssSupported,
                                    int roamingIndicator, int systemIsInPrl,
                                    int defaultRoamingIndicator) {
        this(domain, transportType, regState, accessNetworkTechnology, rejectCause, emergencyOnly,
                availableServices, cellIdentity);
            int accessNetworkTechnology, int reasonForDenial, boolean emergencyOnly,
            int[] availableServices, @Nullable CellIdentity cellIdentity, boolean cssSupported,
            int roamingIndicator, int systemIsInPrl, int defaultRoamingIndicator) {
        this(domain, transportType, regState, accessNetworkTechnology,
                reasonForDenial, emergencyOnly, availableServices, cellIdentity);

        mVoiceSpecificStates = new VoiceSpecificRegistrationStates(cssSupported, roamingIndicator,
                systemIsInPrl, defaultRoamingIndicator);
@@ -169,11 +153,10 @@ public class NetworkRegistrationState implements Parcelable {
     * @hide
     */
    public NetworkRegistrationState(int domain, int transportType, int regState,
                                    int accessNetworkTechnology, int rejectCause,
                                    boolean emergencyOnly, int[] availableServices,
                                    @Nullable CellIdentity cellIdentity, int maxDataCalls) {
        this(domain, transportType, regState, accessNetworkTechnology, rejectCause, emergencyOnly,
                availableServices, cellIdentity);
            int accessNetworkTechnology, int reasonForDenial, boolean emergencyOnly,
            int[] availableServices, @Nullable CellIdentity cellIdentity, int maxDataCalls) {
        this(domain, transportType, regState, accessNetworkTechnology,
                reasonForDenial, emergencyOnly, availableServices, cellIdentity);

        mDataSpecificStates = new DataSpecificRegistrationStates(maxDataCalls);
    }
@@ -183,7 +166,7 @@ public class NetworkRegistrationState implements Parcelable {
        mTransportType = source.readInt();
        mRegState = source.readInt();
        mAccessNetworkTechnology = source.readInt();
        mRejectCause = source.readInt();
        mReasonForDenial = source.readInt();
        mEmergencyOnly = source.readBoolean();
        mAvailableServices = source.createIntArray();
        mCellIdentity = source.readParcelable(CellIdentity.class.getClassLoader());
@@ -228,10 +211,10 @@ public class NetworkRegistrationState implements Parcelable {
    }

    /**
     * @return Network reject cause
     * @return Reason for denial from network.
     */
    public int getRejectCause() {
        return mRejectCause;
    public int getReasonForDenial() {
        return mReasonForDenial;
    }

    /**
@@ -282,7 +265,7 @@ public class NetworkRegistrationState implements Parcelable {
                .append(" regState=").append(regStateToString(mRegState))
                .append(" accessNetworkTechnology=")
                .append(TelephonyManager.getNetworkTypeName(mAccessNetworkTechnology))
                .append(" rejectCause=").append(mRejectCause)
                .append(" reasonForDenial=").append(mReasonForDenial)
                .append(" emergencyEnabled=").append(mEmergencyOnly)
                .append(" supportedServices=").append(mAvailableServices)
                .append(" cellIdentity=").append(mCellIdentity)
@@ -293,8 +276,8 @@ public class NetworkRegistrationState implements Parcelable {

    @Override
    public int hashCode() {
        return Objects.hash(mDomain, mTransportType, mRegState, mAccessNetworkTechnology,
                mRejectCause, mEmergencyOnly, mAvailableServices, mCellIdentity,
        return Objects.hash(mTransportType, mDomain, mRegState, mAccessNetworkTechnology,
                mReasonForDenial, mEmergencyOnly, mAvailableServices, mCellIdentity,
                mVoiceSpecificStates, mDataSpecificStates);
    }

@@ -311,7 +294,7 @@ public class NetworkRegistrationState implements Parcelable {
                && mTransportType == other.mTransportType
                && mRegState == other.mRegState
                && mAccessNetworkTechnology == other.mAccessNetworkTechnology
                && mRejectCause == other.mRejectCause
                && mReasonForDenial == other.mReasonForDenial
                && mEmergencyOnly == other.mEmergencyOnly
                && (mAvailableServices == other.mAvailableServices
                    || Arrays.equals(mAvailableServices, other.mAvailableServices))
@@ -326,7 +309,7 @@ public class NetworkRegistrationState implements Parcelable {
        dest.writeInt(mTransportType);
        dest.writeInt(mRegState);
        dest.writeInt(mAccessNetworkTechnology);
        dest.writeInt(mRejectCause);
        dest.writeInt(mReasonForDenial);
        dest.writeBoolean(mEmergencyOnly);
        dest.writeIntArray(mAvailableServices);
        dest.writeParcelable(mCellIdentity, 0);