Merge "Renamed DataSpecificRegistrationState"

am: 86675ed5c0

Change-Id: Ice5fa2213a8a1850e6a6842c197d5926c0193b3c
This commit is contained in:
Jack Yu
2019-03-27 09:51:07 -07:00
committed by android-build-merger
8 changed files with 171 additions and 59 deletions

View File

@@ -5916,11 +5916,11 @@ package android.telephony {
field public static final int VSNCP_TIMEOUT = 2236; // 0x8bc field public static final int VSNCP_TIMEOUT = 2236; // 0x8bc
} }
public final class DataSpecificRegistrationStates implements android.os.Parcelable { public final class DataSpecificRegistrationInfo implements android.os.Parcelable {
method public int describeContents(); method public int describeContents();
method @NonNull public android.telephony.LteVopsSupportInfo getLteVopsSupportInfo(); method @NonNull public android.telephony.LteVopsSupportInfo getLteVopsSupportInfo();
method public void writeToParcel(android.os.Parcel, int); method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.DataSpecificRegistrationStates> CREATOR; field @NonNull public static final android.os.Parcelable.Creator<android.telephony.DataSpecificRegistrationInfo> CREATOR;
} }
public final class DisconnectCause { public final class DisconnectCause {
@@ -6029,7 +6029,7 @@ package android.telephony {
method public int getAccessNetworkTechnology(); method public int getAccessNetworkTechnology();
method @NonNull public java.util.List<java.lang.Integer> getAvailableServices(); method @NonNull public java.util.List<java.lang.Integer> getAvailableServices();
method @Nullable public android.telephony.CellIdentity getCellIdentity(); method @Nullable public android.telephony.CellIdentity getCellIdentity();
method @Nullable public android.telephony.DataSpecificRegistrationStates getDataSpecificStates(); method @Nullable public android.telephony.DataSpecificRegistrationInfo getDataSpecificInfo();
method public int getDomain(); method public int getDomain();
method public int getRegistrationState(); method public int getRegistrationState();
method public int getRejectCause(); method public int getRejectCause();

View File

@@ -1484,10 +1484,34 @@ package android.telecom {
package android.telephony { package android.telephony {
public final class AccessNetworkConstants {
field public static final int TRANSPORT_TYPE_WLAN = 2; // 0x2
field public static final int TRANSPORT_TYPE_WWAN = 1; // 0x1
}
public class CarrierConfigManager { public class CarrierConfigManager {
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void overrideConfig(int, @Nullable android.os.PersistableBundle); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void overrideConfig(int, @Nullable android.os.PersistableBundle);
} }
public final class DataSpecificRegistrationInfo implements android.os.Parcelable {
method public int describeContents();
method @NonNull public android.telephony.LteVopsSupportInfo getLteVopsSupportInfo();
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.DataSpecificRegistrationInfo> CREATOR;
}
public final class LteVopsSupportInfo implements android.os.Parcelable {
ctor public LteVopsSupportInfo(int, int);
method public int describeContents();
method public int getEmcBearerSupport();
method public int getVopsSupport();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.LteVopsSupportInfo> CREATOR;
field public static final int LTE_STATUS_NOT_AVAILABLE = 1; // 0x1
field public static final int LTE_STATUS_NOT_SUPPORTED = 3; // 0x3
field public static final int LTE_STATUS_SUPPORTED = 2; // 0x2
}
public class MbmsDownloadSession implements java.lang.AutoCloseable { public class MbmsDownloadSession implements java.lang.AutoCloseable {
field public static final String MBMS_DOWNLOAD_SERVICE_OVERRIDE_METADATA = "mbms-download-service-override"; field public static final String MBMS_DOWNLOAD_SERVICE_OVERRIDE_METADATA = "mbms-download-service-override";
} }
@@ -1500,7 +1524,52 @@ package android.telephony {
field public static final String MBMS_STREAMING_SERVICE_OVERRIDE_METADATA = "mbms-streaming-service-override"; field public static final String MBMS_STREAMING_SERVICE_OVERRIDE_METADATA = "mbms-streaming-service-override";
} }
public final class NetworkRegistrationInfo implements android.os.Parcelable {
method public int describeContents();
method public int getAccessNetworkTechnology();
method @NonNull public java.util.List<java.lang.Integer> getAvailableServices();
method @Nullable public android.telephony.CellIdentity getCellIdentity();
method @Nullable public android.telephony.DataSpecificRegistrationInfo getDataSpecificInfo();
method public int getDomain();
method public int getRegistrationState();
method public int getRejectCause();
method public int getRoamingType();
method public int getTransportType();
method public boolean isEmergencyEnabled();
method public boolean isRoaming();
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.NetworkRegistrationInfo> CREATOR;
field public static final int DOMAIN_CS = 1; // 0x1
field public static final int DOMAIN_PS = 2; // 0x2
field public static final int REGISTRATION_STATE_DENIED = 3; // 0x3
field public static final int REGISTRATION_STATE_HOME = 1; // 0x1
field public static final int REGISTRATION_STATE_NOT_REGISTERED_OR_SEARCHING = 0; // 0x0
field public static final int REGISTRATION_STATE_NOT_REGISTERED_SEARCHING = 2; // 0x2
field public static final int REGISTRATION_STATE_ROAMING = 5; // 0x5
field public static final int REGISTRATION_STATE_UNKNOWN = 4; // 0x4
field public static final int SERVICE_TYPE_DATA = 2; // 0x2
field public static final int SERVICE_TYPE_EMERGENCY = 5; // 0x5
field public static final int SERVICE_TYPE_SMS = 3; // 0x3
field public static final int SERVICE_TYPE_UNKNOWN = 0; // 0x0
field public static final int SERVICE_TYPE_VIDEO = 4; // 0x4
field public static final int SERVICE_TYPE_VOICE = 1; // 0x1
}
public static final class NetworkRegistrationInfo.Builder {
ctor public NetworkRegistrationInfo.Builder();
method @NonNull public android.telephony.NetworkRegistrationInfo build();
method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setAccessNetworkTechnology(int);
method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setAvailableServices(@NonNull java.util.List<java.lang.Integer>);
method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setCellIdentity(@Nullable android.telephony.CellIdentity);
method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setDomain(int);
method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setEmergencyOnly(boolean);
method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setRegistrationState(int);
method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setRejectCause(int);
method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setTransportType(int);
}
public class ServiceState implements android.os.Parcelable { public class ServiceState implements android.os.Parcelable {
method public void addNetworkRegistrationInfo(android.telephony.NetworkRegistrationInfo);
method public void setCdmaSystemAndNetworkId(int, int); method public void setCdmaSystemAndNetworkId(int, int);
method public void setCellBandwidths(int[]); method public void setCellBandwidths(int[]);
method public void setChannelNumber(int); method public void setChannelNumber(int);

View File

@@ -18,6 +18,7 @@ package android.telephony;
import android.annotation.IntDef; import android.annotation.IntDef;
import android.annotation.SystemApi; import android.annotation.SystemApi;
import android.annotation.TestApi;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
@@ -51,6 +52,7 @@ public final class AccessNetworkConstants {
* @hide * @hide
*/ */
@SystemApi @SystemApi
@TestApi
public static final int TRANSPORT_TYPE_WWAN = 1; public static final int TRANSPORT_TYPE_WWAN = 1;
/** /**
@@ -58,6 +60,7 @@ public final class AccessNetworkConstants {
* @hide * @hide
*/ */
@SystemApi @SystemApi
@TestApi
public static final int TRANSPORT_TYPE_WLAN = 2; public static final int TRANSPORT_TYPE_WLAN = 2;
/** @hide */ /** @hide */

View File

@@ -1,7 +1,24 @@
/*
* Copyright 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.telephony; package android.telephony;
import android.annotation.NonNull; import android.annotation.NonNull;
import android.annotation.SystemApi; import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
@@ -13,7 +30,8 @@ import java.util.Objects;
* @hide * @hide
*/ */
@SystemApi @SystemApi
public final class DataSpecificRegistrationStates implements Parcelable{ @TestApi
public final class DataSpecificRegistrationInfo implements Parcelable {
/** /**
* @hide * @hide
* The maximum number of simultaneous Data Calls that * The maximum number of simultaneous Data Calls that
@@ -53,27 +71,27 @@ public final class DataSpecificRegistrationStates implements Parcelable{
/** /**
* Provides network support info for LTE VoPS and LTE Emergency bearer support * Provides network support info for LTE VoPS and LTE Emergency bearer support
*/ */
private final LteVopsSupportInfo lteVopsSupportInfo; private final LteVopsSupportInfo mLteVopsSupportInfo;
/** /**
* @hide * @hide
*/ */
DataSpecificRegistrationStates( DataSpecificRegistrationInfo(
int maxDataCalls, boolean isDcNrRestricted, boolean isNrAvailable, int maxDataCalls, boolean isDcNrRestricted, boolean isNrAvailable,
boolean isEnDcAvailable, LteVopsSupportInfo lteVops) { boolean isEnDcAvailable, LteVopsSupportInfo lteVops) {
this.maxDataCalls = maxDataCalls; this.maxDataCalls = maxDataCalls;
this.isDcNrRestricted = isDcNrRestricted; this.isDcNrRestricted = isDcNrRestricted;
this.isNrAvailable = isNrAvailable; this.isNrAvailable = isNrAvailable;
this.isEnDcAvailable = isEnDcAvailable; this.isEnDcAvailable = isEnDcAvailable;
this.lteVopsSupportInfo = lteVops; this.mLteVopsSupportInfo = lteVops;
} }
private DataSpecificRegistrationStates(Parcel source) { private DataSpecificRegistrationInfo(Parcel source) {
maxDataCalls = source.readInt(); maxDataCalls = source.readInt();
isDcNrRestricted = source.readBoolean(); isDcNrRestricted = source.readBoolean();
isNrAvailable = source.readBoolean(); isNrAvailable = source.readBoolean();
isEnDcAvailable = source.readBoolean(); isEnDcAvailable = source.readBoolean();
lteVopsSupportInfo = LteVopsSupportInfo.CREATOR.createFromParcel(source); mLteVopsSupportInfo = LteVopsSupportInfo.CREATOR.createFromParcel(source);
} }
@Override @Override
@@ -82,7 +100,7 @@ public final class DataSpecificRegistrationStates implements Parcelable{
dest.writeBoolean(isDcNrRestricted); dest.writeBoolean(isDcNrRestricted);
dest.writeBoolean(isNrAvailable); dest.writeBoolean(isNrAvailable);
dest.writeBoolean(isEnDcAvailable); dest.writeBoolean(isEnDcAvailable);
lteVopsSupportInfo.writeToParcel(dest, flags); mLteVopsSupportInfo.writeToParcel(dest, flags);
} }
@Override @Override
@@ -98,7 +116,7 @@ public final class DataSpecificRegistrationStates implements Parcelable{
.append(" isDcNrRestricted = " + isDcNrRestricted) .append(" isDcNrRestricted = " + isDcNrRestricted)
.append(" isNrAvailable = " + isNrAvailable) .append(" isNrAvailable = " + isNrAvailable)
.append(" isEnDcAvailable = " + isEnDcAvailable) .append(" isEnDcAvailable = " + isEnDcAvailable)
.append(lteVopsSupportInfo.toString()) .append(mLteVopsSupportInfo.toString())
.append(" }") .append(" }")
.toString(); .toString();
} }
@@ -106,41 +124,41 @@ public final class DataSpecificRegistrationStates implements Parcelable{
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(maxDataCalls, isDcNrRestricted, isNrAvailable, isEnDcAvailable, return Objects.hash(maxDataCalls, isDcNrRestricted, isNrAvailable, isEnDcAvailable,
lteVopsSupportInfo); mLteVopsSupportInfo);
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
if (!(o instanceof DataSpecificRegistrationStates)) return false; if (!(o instanceof DataSpecificRegistrationInfo)) return false;
DataSpecificRegistrationStates other = (DataSpecificRegistrationStates) o; DataSpecificRegistrationInfo other = (DataSpecificRegistrationInfo) o;
return this.maxDataCalls == other.maxDataCalls return this.maxDataCalls == other.maxDataCalls
&& this.isDcNrRestricted == other.isDcNrRestricted && this.isDcNrRestricted == other.isDcNrRestricted
&& this.isNrAvailable == other.isNrAvailable && this.isNrAvailable == other.isNrAvailable
&& this.isEnDcAvailable == other.isEnDcAvailable && this.isEnDcAvailable == other.isEnDcAvailable
&& this.lteVopsSupportInfo.equals(other.lteVopsSupportInfo); && this.mLteVopsSupportInfo.equals(other.mLteVopsSupportInfo);
} }
public static final Parcelable.Creator<DataSpecificRegistrationStates> CREATOR = public static final @NonNull Parcelable.Creator<DataSpecificRegistrationInfo> CREATOR =
new Parcelable.Creator<DataSpecificRegistrationStates>() { new Parcelable.Creator<DataSpecificRegistrationInfo>() {
@Override @Override
public DataSpecificRegistrationStates createFromParcel(Parcel source) { public DataSpecificRegistrationInfo createFromParcel(Parcel source) {
return new DataSpecificRegistrationStates(source); return new DataSpecificRegistrationInfo(source);
} }
@Override @Override
public DataSpecificRegistrationStates[] newArray(int size) { public DataSpecificRegistrationInfo[] newArray(int size) {
return new DataSpecificRegistrationStates[size]; return new DataSpecificRegistrationInfo[size];
} }
}; };
/** /**
* @return LteVopsSupportInfo * @return The LTE VOPS (Voice over Packet Switched) support information
*/ */
@NonNull @NonNull
public LteVopsSupportInfo getLteVopsSupportInfo() { public LteVopsSupportInfo getLteVopsSupportInfo() {
return lteVopsSupportInfo; return mLteVopsSupportInfo;
} }
} }

View File

@@ -18,6 +18,7 @@ package android.telephony;
import android.annotation.IntDef; import android.annotation.IntDef;
import android.annotation.SystemApi; import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
@@ -30,6 +31,7 @@ import java.util.Objects;
* @hide * @hide
*/ */
@SystemApi @SystemApi
@TestApi
public final class LteVopsSupportInfo implements Parcelable { public final class LteVopsSupportInfo implements Parcelable {
/**@hide*/ /**@hide*/

View File

@@ -20,6 +20,7 @@ import android.annotation.IntDef;
import android.annotation.NonNull; import android.annotation.NonNull;
import android.annotation.Nullable; import android.annotation.Nullable;
import android.annotation.SystemApi; import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.telephony.AccessNetworkConstants.TransportType; import android.telephony.AccessNetworkConstants.TransportType;
@@ -38,6 +39,7 @@ import java.util.stream.Collectors;
* @hide * @hide
*/ */
@SystemApi @SystemApi
@TestApi
public final class NetworkRegistrationInfo implements Parcelable { public final class NetworkRegistrationInfo implements Parcelable {
/** /**
* Network domain * Network domain
@@ -174,10 +176,10 @@ public final class NetworkRegistrationInfo implements Parcelable {
private CellIdentity mCellIdentity; private CellIdentity mCellIdentity;
@Nullable @Nullable
private VoiceSpecificRegistrationStates mVoiceSpecificStates; private VoiceSpecificRegistrationInfo mVoiceSpecificInfo;
@Nullable @Nullable
private DataSpecificRegistrationStates mDataSpecificStates; private DataSpecificRegistrationInfo mDataSpecificInfo;
/** /**
* @param domain Network domain. Must be a {@link Domain}. For transport type * @param domain Network domain. Must be a {@link Domain}. For transport type
@@ -234,7 +236,7 @@ public final class NetworkRegistrationInfo implements Parcelable {
this(domain, transportType, registrationState, accessNetworkTechnology, rejectCause, this(domain, transportType, registrationState, accessNetworkTechnology, rejectCause,
emergencyOnly, availableServices, cellIdentity); emergencyOnly, availableServices, cellIdentity);
mVoiceSpecificStates = new VoiceSpecificRegistrationStates(cssSupported, roamingIndicator, mVoiceSpecificInfo = new VoiceSpecificRegistrationInfo(cssSupported, roamingIndicator,
systemIsInPrl, defaultRoamingIndicator); systemIsInPrl, defaultRoamingIndicator);
} }
@@ -253,9 +255,9 @@ public final class NetworkRegistrationInfo implements Parcelable {
this(domain, transportType, registrationState, accessNetworkTechnology, rejectCause, this(domain, transportType, registrationState, accessNetworkTechnology, rejectCause,
emergencyOnly, availableServices, cellIdentity); emergencyOnly, availableServices, cellIdentity);
mDataSpecificStates = new DataSpecificRegistrationStates( mDataSpecificInfo = new DataSpecificRegistrationInfo(
maxDataCalls, isDcNrRestricted, isNrAvailable, isEndcAvailable, lteVopsSupportInfo); maxDataCalls, isDcNrRestricted, isNrAvailable, isEndcAvailable, lteVopsSupportInfo);
updateNrState(mDataSpecificStates); updateNrState(mDataSpecificInfo);
} }
private NetworkRegistrationInfo(Parcel source) { private NetworkRegistrationInfo(Parcel source) {
@@ -269,10 +271,10 @@ public final class NetworkRegistrationInfo implements Parcelable {
mAvailableServices = new ArrayList<>(); mAvailableServices = new ArrayList<>();
source.readList(mAvailableServices, Integer.class.getClassLoader()); source.readList(mAvailableServices, Integer.class.getClassLoader());
mCellIdentity = source.readParcelable(CellIdentity.class.getClassLoader()); mCellIdentity = source.readParcelable(CellIdentity.class.getClassLoader());
mVoiceSpecificStates = source.readParcelable( mVoiceSpecificInfo = source.readParcelable(
VoiceSpecificRegistrationStates.class.getClassLoader()); VoiceSpecificRegistrationInfo.class.getClassLoader());
mDataSpecificStates = source.readParcelable( mDataSpecificInfo = source.readParcelable(
DataSpecificRegistrationStates.class.getClassLoader()); DataSpecificRegistrationInfo.class.getClassLoader());
mNrState = source.readInt(); mNrState = source.readInt();
} }
@@ -389,16 +391,16 @@ public final class NetworkRegistrationInfo implements Parcelable {
* @hide * @hide
*/ */
@Nullable @Nullable
public VoiceSpecificRegistrationStates getVoiceSpecificStates() { public VoiceSpecificRegistrationInfo getVoiceSpecificInfo() {
return mVoiceSpecificStates; return mVoiceSpecificInfo;
} }
/** /**
* @return Data registration related info * @return Data registration related info
*/ */
@Nullable @Nullable
public DataSpecificRegistrationStates getDataSpecificStates() { public DataSpecificRegistrationInfo getDataSpecificInfo() {
return mDataSpecificStates; return mDataSpecificInfo;
} }
@Override @Override
@@ -474,8 +476,8 @@ public final class NetworkRegistrationInfo implements Parcelable {
? mAvailableServices.stream().map(type -> serviceTypeToString(type)) ? mAvailableServices.stream().map(type -> serviceTypeToString(type))
.collect(Collectors.joining(",")) : null) + "]") .collect(Collectors.joining(",")) : null) + "]")
.append(" cellIdentity=").append(mCellIdentity) .append(" cellIdentity=").append(mCellIdentity)
.append(" voiceSpecificStates=").append(mVoiceSpecificStates) .append(" voiceSpecificInfo=").append(mVoiceSpecificInfo)
.append(" dataSpecificStates=").append(mDataSpecificStates) .append(" dataSpecificInfo=").append(mDataSpecificInfo)
.append(" nrState=").append(nrStateToString(mNrState)) .append(" nrState=").append(nrStateToString(mNrState))
.append("}").toString(); .append("}").toString();
} }
@@ -484,7 +486,7 @@ public final class NetworkRegistrationInfo implements Parcelable {
public int hashCode() { public int hashCode() {
return Objects.hash(mDomain, mTransportType, mRegistrationState, mRoamingType, return Objects.hash(mDomain, mTransportType, mRegistrationState, mRoamingType,
mAccessNetworkTechnology, mRejectCause, mEmergencyOnly, mAvailableServices, mAccessNetworkTechnology, mRejectCause, mEmergencyOnly, mAvailableServices,
mCellIdentity, mVoiceSpecificStates, mDataSpecificStates, mNrState); mCellIdentity, mVoiceSpecificInfo, mDataSpecificInfo, mNrState);
} }
@Override @Override
@@ -505,8 +507,8 @@ public final class NetworkRegistrationInfo implements Parcelable {
&& mEmergencyOnly == other.mEmergencyOnly && mEmergencyOnly == other.mEmergencyOnly
&& mAvailableServices.equals(other.mAvailableServices) && mAvailableServices.equals(other.mAvailableServices)
&& Objects.equals(mCellIdentity, other.mCellIdentity) && Objects.equals(mCellIdentity, other.mCellIdentity)
&& Objects.equals(mVoiceSpecificStates, other.mVoiceSpecificStates) && Objects.equals(mVoiceSpecificInfo, other.mVoiceSpecificInfo)
&& Objects.equals(mDataSpecificStates, other.mDataSpecificStates) && Objects.equals(mDataSpecificInfo, other.mDataSpecificInfo)
&& mNrState == other.mNrState; && mNrState == other.mNrState;
} }
@@ -521,8 +523,8 @@ public final class NetworkRegistrationInfo implements Parcelable {
dest.writeBoolean(mEmergencyOnly); dest.writeBoolean(mEmergencyOnly);
dest.writeList(mAvailableServices); dest.writeList(mAvailableServices);
dest.writeParcelable(mCellIdentity, 0); dest.writeParcelable(mCellIdentity, 0);
dest.writeParcelable(mVoiceSpecificStates, 0); dest.writeParcelable(mVoiceSpecificInfo, 0);
dest.writeParcelable(mDataSpecificStates, 0); dest.writeParcelable(mDataSpecificInfo, 0);
dest.writeInt(mNrState); dest.writeInt(mNrState);
} }
@@ -543,7 +545,7 @@ public final class NetworkRegistrationInfo implements Parcelable {
* *
* @param state data specific registration state contains the 5G NR indicators. * @param state data specific registration state contains the 5G NR indicators.
*/ */
private void updateNrState(DataSpecificRegistrationStates state) { private void updateNrState(DataSpecificRegistrationInfo state) {
mNrState = NR_STATE_NONE; mNrState = NR_STATE_NONE;
if (state.isEnDcAvailable) { if (state.isEnDcAvailable) {
if (!state.isDcNrRestricted && state.isNrAvailable) { if (!state.isDcNrRestricted && state.isNrAvailable) {

View File

@@ -1855,6 +1855,7 @@ public class ServiceState implements Parcelable {
/** /**
* @hide * @hide
*/ */
@TestApi
public void addNetworkRegistrationInfo(NetworkRegistrationInfo regState) { public void addNetworkRegistrationInfo(NetworkRegistrationInfo regState) {
if (regState == null) return; if (regState == null) return;

View File

@@ -1,5 +1,22 @@
/*
* Copyright 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.telephony; package android.telephony;
import android.annotation.NonNull;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
@@ -10,14 +27,14 @@ import java.util.Objects;
* Class that stores information specific to voice network registration. * Class that stores information specific to voice network registration.
* @hide * @hide
*/ */
public class VoiceSpecificRegistrationStates implements Parcelable{ public class VoiceSpecificRegistrationInfo implements Parcelable{
/** /**
* oncurrent services support indicator. if * oncurrent services support indicator. if
* registered on a CDMA system. * registered on a CDMA system.
* false - Concurrent services not supported, * false - Concurrent services not supported,
* true - Concurrent services supported * true - Concurrent services supported
*/ */
public final boolean cssSupported; public final boolean cssSupported;
/** /**
* TSB-58 Roaming Indicator if registered * TSB-58 Roaming Indicator if registered
@@ -40,15 +57,15 @@ public class VoiceSpecificRegistrationStates implements Parcelable{
*/ */
public final int defaultRoamingIndicator; public final int defaultRoamingIndicator;
VoiceSpecificRegistrationStates(boolean cssSupported, int roamingIndicator, int systemIsInPrl, VoiceSpecificRegistrationInfo(boolean cssSupported, int roamingIndicator, int systemIsInPrl,
int defaultRoamingIndicator) { int defaultRoamingIndicator) {
this.cssSupported = cssSupported; this.cssSupported = cssSupported;
this.roamingIndicator = roamingIndicator; this.roamingIndicator = roamingIndicator;
this.systemIsInPrl = systemIsInPrl; this.systemIsInPrl = systemIsInPrl;
this.defaultRoamingIndicator = defaultRoamingIndicator; this.defaultRoamingIndicator = defaultRoamingIndicator;
} }
private VoiceSpecificRegistrationStates(Parcel source) { private VoiceSpecificRegistrationInfo(Parcel source) {
this.cssSupported = source.readBoolean(); this.cssSupported = source.readBoolean();
this.roamingIndicator = source.readInt(); this.roamingIndicator = source.readInt();
this.systemIsInPrl = source.readInt(); this.systemIsInPrl = source.readInt();
@@ -70,7 +87,7 @@ public class VoiceSpecificRegistrationStates implements Parcelable{
@Override @Override
public String toString() { public String toString() {
return "VoiceSpecificRegistrationStates {" return "VoiceSpecificRegistrationInfo {"
+ " mCssSupported=" + cssSupported + " mCssSupported=" + cssSupported
+ " mRoamingIndicator=" + roamingIndicator + " mRoamingIndicator=" + roamingIndicator
+ " mSystemIsInPrl=" + systemIsInPrl + " mSystemIsInPrl=" + systemIsInPrl
@@ -87,11 +104,11 @@ public class VoiceSpecificRegistrationStates implements Parcelable{
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
if (o == null || !(o instanceof VoiceSpecificRegistrationStates)) { if (o == null || !(o instanceof VoiceSpecificRegistrationInfo)) {
return false; return false;
} }
VoiceSpecificRegistrationStates other = (VoiceSpecificRegistrationStates) o; VoiceSpecificRegistrationInfo other = (VoiceSpecificRegistrationInfo) o;
return this.cssSupported == other.cssSupported return this.cssSupported == other.cssSupported
&& this.roamingIndicator == other.roamingIndicator && this.roamingIndicator == other.roamingIndicator
&& this.systemIsInPrl == other.systemIsInPrl && this.systemIsInPrl == other.systemIsInPrl
@@ -99,16 +116,16 @@ public class VoiceSpecificRegistrationStates implements Parcelable{
} }
public static final Parcelable.Creator<VoiceSpecificRegistrationStates> CREATOR = public static final @NonNull Parcelable.Creator<VoiceSpecificRegistrationInfo> CREATOR =
new Parcelable.Creator<VoiceSpecificRegistrationStates>() { new Parcelable.Creator<VoiceSpecificRegistrationInfo>() {
@Override @Override
public VoiceSpecificRegistrationStates createFromParcel(Parcel source) { public VoiceSpecificRegistrationInfo createFromParcel(Parcel source) {
return new VoiceSpecificRegistrationStates(source); return new VoiceSpecificRegistrationInfo(source);
} }
@Override @Override
public VoiceSpecificRegistrationStates[] newArray(int size) { public VoiceSpecificRegistrationInfo[] newArray(int size) {
return new VoiceSpecificRegistrationStates[size]; return new VoiceSpecificRegistrationInfo[size];
} }
}; };
} }