Merge "Exposing NetworkRegistrationInfo for PS service" am: 3ae8d12fe6 am: 4e34673c9a am: dbb66deae3
Change-Id: Id16673fea38c05bfa93d6a0459a5ae383ca0a04d
This commit is contained in:
@@ -45078,6 +45078,8 @@ package android.telecom {
|
||||
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 static final class AccessNetworkConstants.AccessNetworkType {
|
||||
@@ -45865,6 +45867,35 @@ package android.telephony {
|
||||
field @Deprecated public static final int UNKNOWN_RSSI = 99; // 0x63
|
||||
}
|
||||
|
||||
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 public int getDomain();
|
||||
method public int getNrState();
|
||||
method public int getTransportType();
|
||||
method public boolean isRegistered();
|
||||
method public boolean isRoaming();
|
||||
method public boolean isSearching();
|
||||
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_CS_PS = 3; // 0x3
|
||||
field public static final int DOMAIN_PS = 2; // 0x2
|
||||
field public static final int DOMAIN_UNKNOWN = 0; // 0x0
|
||||
field public static final int NR_STATE_CONNECTED = 3; // 0x3
|
||||
field public static final int NR_STATE_NONE = 0; // 0x0
|
||||
field public static final int NR_STATE_NOT_RESTRICTED = 2; // 0x2
|
||||
field public static final int NR_STATE_RESTRICTED = 1; // 0x1
|
||||
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 class NetworkScan {
|
||||
method public void stopScan();
|
||||
field public static final int ERROR_INTERRUPTED = 10002; // 0x2712
|
||||
@@ -46039,6 +46070,7 @@ package android.telephony {
|
||||
method public int getChannelNumber();
|
||||
method public int getDuplexMode();
|
||||
method public boolean getIsManualSelection();
|
||||
method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoList();
|
||||
method public String getOperatorAlphaLong();
|
||||
method public String getOperatorAlphaShort();
|
||||
method public String getOperatorNumeric();
|
||||
|
||||
@@ -9557,8 +9557,6 @@ package android.telephony {
|
||||
|
||||
public final class AccessNetworkConstants {
|
||||
field public static final int TRANSPORT_TYPE_INVALID = -1; // 0xffffffff
|
||||
field public static final int TRANSPORT_TYPE_WLAN = 2; // 0x2
|
||||
field public static final int TRANSPORT_TYPE_WWAN = 1; // 0x1
|
||||
}
|
||||
|
||||
public final class BarringInfo implements android.os.Parcelable {
|
||||
@@ -10203,37 +10201,18 @@ package android.telephony {
|
||||
}
|
||||
|
||||
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 getNrState();
|
||||
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_CS_PS = 3; // 0x3
|
||||
field public static final int DOMAIN_PS = 2; // 0x2
|
||||
field public static final int DOMAIN_UNKNOWN = 0; // 0x0
|
||||
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 {
|
||||
@@ -10451,7 +10430,6 @@ package android.telephony {
|
||||
method public int getDataRegistrationState();
|
||||
method public boolean getDataRoamingFromRegistration();
|
||||
method @Nullable public android.telephony.NetworkRegistrationInfo getNetworkRegistrationInfo(int, int);
|
||||
method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoList();
|
||||
method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForDomain(int);
|
||||
method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForTransportType(int);
|
||||
method public int getNrFrequencyRange();
|
||||
|
||||
@@ -3141,8 +3141,6 @@ package android.telephony {
|
||||
|
||||
public final class AccessNetworkConstants {
|
||||
field public static final int TRANSPORT_TYPE_INVALID = -1; // 0xffffffff
|
||||
field public static final int TRANSPORT_TYPE_WLAN = 2; // 0x2
|
||||
field public static final int TRANSPORT_TYPE_WWAN = 1; // 0x1
|
||||
}
|
||||
|
||||
public final class BarringInfo implements android.os.Parcelable {
|
||||
@@ -3218,36 +3216,18 @@ package android.telephony {
|
||||
}
|
||||
|
||||
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_CS_PS = 3; // 0x3
|
||||
field public static final int DOMAIN_PS = 2; // 0x2
|
||||
field public static final int DOMAIN_UNKNOWN = 0; // 0x0
|
||||
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 {
|
||||
|
||||
@@ -50,18 +50,12 @@ public final class AccessNetworkConstants {
|
||||
|
||||
/**
|
||||
* Transport type for Wireless Wide Area Networks (i.e. Cellular)
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public static final int TRANSPORT_TYPE_WWAN = 1;
|
||||
|
||||
/**
|
||||
* Transport type for Wireless Local Area Networks (i.e. Wifi)
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public static final int TRANSPORT_TYPE_WLAN = 2;
|
||||
|
||||
/** @hide */
|
||||
|
||||
@@ -36,10 +36,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Description of a mobile network registration info
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public final class NetworkRegistrationInfo implements Parcelable {
|
||||
/**
|
||||
* Network domain
|
||||
@@ -51,9 +48,9 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
|
||||
/** Unknown / Unspecified domain */
|
||||
public static final int DOMAIN_UNKNOWN = 0;
|
||||
/** Circuit switching domain */
|
||||
/** Circuit switched domain */
|
||||
public static final int DOMAIN_CS = android.hardware.radio.V1_5.Domain.CS;
|
||||
/** Packet switching domain */
|
||||
/** Packet switched domain */
|
||||
public static final int DOMAIN_PS = android.hardware.radio.V1_5.Domain.PS;
|
||||
/** Applicable to both CS and PS Domain */
|
||||
public static final int DOMAIN_CS_PS = DOMAIN_CS | DOMAIN_PS;
|
||||
@@ -69,17 +66,41 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
REGISTRATION_STATE_UNKNOWN, REGISTRATION_STATE_ROAMING})
|
||||
public @interface RegistrationState {}
|
||||
|
||||
/** Not registered. The device is not currently searching a new operator to register. */
|
||||
/**
|
||||
* Not registered. The device is not currently searching a new operator to register.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public static final int REGISTRATION_STATE_NOT_REGISTERED_OR_SEARCHING = 0;
|
||||
/** Registered on home network. */
|
||||
/**
|
||||
* Registered on home network.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public static final int REGISTRATION_STATE_HOME = 1;
|
||||
/** Not registered. The device is currently searching a new operator to register. */
|
||||
/**
|
||||
* Not registered. The device is currently searching a new operator to register.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public static final int REGISTRATION_STATE_NOT_REGISTERED_SEARCHING = 2;
|
||||
/** Registration denied. */
|
||||
/**
|
||||
* Registration denied.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public static final int REGISTRATION_STATE_DENIED = 3;
|
||||
/** Registration state is unknown. */
|
||||
/**
|
||||
* Registration state is unknown.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public static final int REGISTRATION_STATE_UNKNOWN = 4;
|
||||
/** Registered on roaming network. */
|
||||
/**
|
||||
* Registered on roaming network.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public static final int REGISTRATION_STATE_ROAMING = 5;
|
||||
|
||||
/** @hide */
|
||||
@@ -92,7 +113,6 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
/**
|
||||
* The device isn't camped on an LTE cell or the LTE cell doesn't support E-UTRA-NR
|
||||
* Dual Connectivity(EN-DC).
|
||||
* @hide
|
||||
*/
|
||||
public static final int NR_STATE_NONE = 0;
|
||||
|
||||
@@ -100,7 +120,6 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
* The device is camped on an LTE cell that supports E-UTRA-NR Dual Connectivity(EN-DC) but
|
||||
* either the use of dual connectivity with NR(DCNR) is restricted or NR is not supported by
|
||||
* the selected PLMN.
|
||||
* @hide
|
||||
*/
|
||||
public static final int NR_STATE_RESTRICTED = 1;
|
||||
|
||||
@@ -108,14 +127,12 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
* The device is camped on an LTE cell that supports E-UTRA-NR Dual Connectivity(EN-DC) and both
|
||||
* the use of dual connectivity with NR(DCNR) is not restricted and NR is supported by the
|
||||
* selected PLMN.
|
||||
* @hide
|
||||
*/
|
||||
public static final int NR_STATE_NOT_RESTRICTED = 2;
|
||||
|
||||
/**
|
||||
* The device is camped on an LTE cell that supports E-UTRA-NR Dual Connectivity(EN-DC) and
|
||||
* also connected to at least one 5G cell as a secondary serving cell.
|
||||
* @hide
|
||||
*/
|
||||
public static final int NR_STATE_CONNECTED = 3;
|
||||
|
||||
@@ -129,22 +146,34 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
SERVICE_TYPE_VIDEO, SERVICE_TYPE_EMERGENCY})
|
||||
public @interface ServiceType {}
|
||||
|
||||
/** Unkown service */
|
||||
/**
|
||||
* Unknown service
|
||||
*/
|
||||
public static final int SERVICE_TYPE_UNKNOWN = 0;
|
||||
|
||||
/** Voice service */
|
||||
/**
|
||||
* Voice service
|
||||
*/
|
||||
public static final int SERVICE_TYPE_VOICE = 1;
|
||||
|
||||
/** Data service */
|
||||
/**
|
||||
* Data service
|
||||
*/
|
||||
public static final int SERVICE_TYPE_DATA = 2;
|
||||
|
||||
/** SMS service */
|
||||
/**
|
||||
* SMS service
|
||||
*/
|
||||
public static final int SERVICE_TYPE_SMS = 3;
|
||||
|
||||
/** Video service */
|
||||
/**
|
||||
* Video service
|
||||
*/
|
||||
public static final int SERVICE_TYPE_VIDEO = 4;
|
||||
|
||||
/** Emergency service */
|
||||
/**
|
||||
* Emergency service
|
||||
*/
|
||||
public static final int SERVICE_TYPE_EMERGENCY = 5;
|
||||
|
||||
@Domain
|
||||
@@ -330,9 +359,7 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
* Get the 5G NR connection state.
|
||||
*
|
||||
* @return the 5G NR connection state.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public @NRState int getNrState() {
|
||||
return mNrState;
|
||||
}
|
||||
@@ -344,11 +371,29 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
|
||||
/**
|
||||
* @return The registration state.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public @RegistrationState int getRegistrationState() {
|
||||
return mRegistrationState;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if registered on roaming network, {@code false} otherwise.
|
||||
*/
|
||||
public boolean isRegistered() {
|
||||
return mRegistrationState == REGISTRATION_STATE_HOME
|
||||
|| mRegistrationState == REGISTRATION_STATE_ROAMING;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if registered on roaming network, {@code false} otherwise.
|
||||
*/
|
||||
public boolean isSearching() {
|
||||
return mRegistrationState == REGISTRATION_STATE_NOT_REGISTERED_SEARCHING;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if registered on roaming network, {@code false} otherwise.
|
||||
*/
|
||||
@@ -376,15 +421,18 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
|
||||
/**
|
||||
* @return the current network roaming type.
|
||||
* @hide
|
||||
*/
|
||||
|
||||
@SystemApi @TestApi
|
||||
public @ServiceState.RoamingType int getRoamingType() {
|
||||
return mRoamingType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Whether emergency is enabled.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public boolean isEmergencyEnabled() { return mEmergencyOnly; }
|
||||
|
||||
/**
|
||||
@@ -422,7 +470,9 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
* @return Reason for denial if the registration state is {@link #REGISTRATION_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
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public int getRejectCause() {
|
||||
return mRejectCause;
|
||||
}
|
||||
@@ -445,8 +495,10 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
|
||||
/**
|
||||
* @return Data registration related info
|
||||
* @hide
|
||||
*/
|
||||
@Nullable
|
||||
@SystemApi @TestApi
|
||||
public DataSpecificRegistrationInfo getDataSpecificInfo() {
|
||||
return mDataSpecificInfo;
|
||||
}
|
||||
@@ -571,7 +623,11 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
&& mNrState == other.mNrState;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
@SystemApi @TestApi
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeInt(mDomain);
|
||||
dest.writeInt(mTransportType);
|
||||
@@ -659,7 +715,9 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
* .setRegistrationState(REGISTRATION_STATE_HOME)
|
||||
* .build();
|
||||
* </code></pre>
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public static final class Builder {
|
||||
@Domain
|
||||
private int mDomain;
|
||||
@@ -759,7 +817,9 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
* @param emergencyOnly True if this network registration is for emergency use only.
|
||||
*
|
||||
* @return The same instance of the builder.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public @NonNull Builder setEmergencyOnly(boolean emergencyOnly) {
|
||||
mEmergencyOnly = emergencyOnly;
|
||||
return this;
|
||||
@@ -771,7 +831,9 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
* @param availableServices Available services.
|
||||
*
|
||||
* @return The same instance of the builder.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public @NonNull Builder setAvailableServices(
|
||||
@NonNull @ServiceType List<Integer> availableServices) {
|
||||
mAvailableServices = availableServices;
|
||||
@@ -784,7 +846,9 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
* @param cellIdentity The cell identity.
|
||||
*
|
||||
* @return The same instance of the builder.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public @NonNull Builder setCellIdentity(@Nullable CellIdentity cellIdentity) {
|
||||
mCellIdentity = cellIdentity;
|
||||
return this;
|
||||
@@ -792,9 +856,10 @@ public final class NetworkRegistrationInfo implements Parcelable {
|
||||
|
||||
/**
|
||||
* Build the NetworkRegistrationInfo.
|
||||
*
|
||||
* @return the NetworkRegistrationInfo object.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi @TestApi
|
||||
public @NonNull NetworkRegistrationInfo build() {
|
||||
return new NetworkRegistrationInfo(mDomain, mTransportType, mRegistrationState,
|
||||
mAccessNetworkTechnology, mRejectCause, mEmergencyOnly, mAvailableServices,
|
||||
|
||||
@@ -1855,10 +1855,8 @@ public class ServiceState implements Parcelable {
|
||||
* Get all of the available network registration info.
|
||||
*
|
||||
* @return List of {@link NetworkRegistrationInfo}
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
@SystemApi
|
||||
public List<NetworkRegistrationInfo> getNetworkRegistrationInfoList() {
|
||||
synchronized (mNetworkRegistrationInfos) {
|
||||
List<NetworkRegistrationInfo> newList = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user