Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -8751,6 +8751,7 @@ package android.telephony { } public class ServiceState implements android.os.Parcelable { method public int getDataRegistrationState(); 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); telephony/java/android/telephony/ServiceState.java +62 −5 Original line number Diff line number Diff line Loading @@ -64,6 +64,13 @@ public class ServiceState implements Parcelable { static final boolean DBG = false; static final boolean VDBG = false; // STOPSHIP if true /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = "STATE_", value = {STATE_IN_SERVICE, STATE_OUT_OF_SERVICE, STATE_EMERGENCY_ONLY, STATE_POWER_OFF}) public @interface RegState {} /** * Normal operation condition, the phone is registered * with an operator either in home network or in roaming. Loading @@ -82,6 +89,7 @@ public class ServiceState implements Parcelable { /** * The phone is registered and locked. Only emergency numbers are allowed. {@more} */ //TODO: This state is not used anymore. It should be deprecated in a future release. public static final int STATE_EMERGENCY_ONLY = TelephonyProtoEnums.SERVICE_STATE_EMERGENCY_ONLY; // 2 Loading Loading @@ -530,13 +538,15 @@ public class ServiceState implements Parcelable { } /** * Get current data service state * Get current data registration state. * * @see #STATE_IN_SERVICE * @see #STATE_OUT_OF_SERVICE * @see #STATE_EMERGENCY_ONLY * @see #STATE_POWER_OFF * * @return current data registration state * * @hide */ @UnsupportedAppUsage Loading @@ -544,6 +554,23 @@ public class ServiceState implements Parcelable { return mDataRegState; } /** * Get current data registration state. * * @see #STATE_IN_SERVICE * @see #STATE_OUT_OF_SERVICE * @see #STATE_EMERGENCY_ONLY * @see #STATE_POWER_OFF * * @return current data registration state * * @hide */ @SystemApi public @RegState int getDataRegistrationState() { return getDataRegState(); } /** * Get the current duplex mode * Loading Loading @@ -1437,7 +1464,15 @@ public class ServiceState implements Parcelable { return getRilDataRadioTechnology(); } /** @hide */ /** * Transform RIL radio technology {@link RilRadioTechnology} value to Network * type {@link NetworkType}. * * @param rat The RIL radio technology {@link RilRadioTechnology}. * @return The network type {@link NetworkType}. * * @hide */ public static int rilRadioTechnologyToNetworkType(@RilRadioTechnology int rat) { switch(rat) { case RIL_RADIO_TECHNOLOGY_GPRS: Loading Loading @@ -1519,7 +1554,15 @@ public class ServiceState implements Parcelable { } } /** @hide */ /** * Transform network type {@link NetworkType} value to RIL radio technology * {@link RilRadioTechnology}. * * @param networkType The network type {@link NetworkType}. * @return The RIL radio technology {@link RilRadioTechnology}. * * @hide */ public static int networkTypeToRilRadioTechnology(int networkType) { switch(networkType) { case TelephonyManager.NETWORK_TYPE_GPRS: Loading Loading @@ -1720,7 +1763,14 @@ public class ServiceState implements Parcelable { return bearerBitmask; } /** @hide */ /** * Convert network type bitmask to bearer bitmask. * * @param networkTypeBitmask The network type bitmask value * @return The bearer bitmask value. * * @hide */ public static int convertNetworkTypeBitmaskToBearerBitmask(int networkTypeBitmask) { if (networkTypeBitmask == 0) { return 0; Loading @@ -1734,7 +1784,14 @@ public class ServiceState implements Parcelable { return bearerBitmask; } /** @hide */ /** * Convert bearer bitmask to network type bitmask. * * @param bearerBitmask The bearer bitmask value. * @return The network type bitmask value. * * @hide */ public static int convertBearerBitmaskToNetworkTypeBitmask(int bearerBitmask) { if (bearerBitmask == 0) { return 0; Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -8751,6 +8751,7 @@ package android.telephony { } public class ServiceState implements android.os.Parcelable { method public int getDataRegistrationState(); 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);
telephony/java/android/telephony/ServiceState.java +62 −5 Original line number Diff line number Diff line Loading @@ -64,6 +64,13 @@ public class ServiceState implements Parcelable { static final boolean DBG = false; static final boolean VDBG = false; // STOPSHIP if true /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = "STATE_", value = {STATE_IN_SERVICE, STATE_OUT_OF_SERVICE, STATE_EMERGENCY_ONLY, STATE_POWER_OFF}) public @interface RegState {} /** * Normal operation condition, the phone is registered * with an operator either in home network or in roaming. Loading @@ -82,6 +89,7 @@ public class ServiceState implements Parcelable { /** * The phone is registered and locked. Only emergency numbers are allowed. {@more} */ //TODO: This state is not used anymore. It should be deprecated in a future release. public static final int STATE_EMERGENCY_ONLY = TelephonyProtoEnums.SERVICE_STATE_EMERGENCY_ONLY; // 2 Loading Loading @@ -530,13 +538,15 @@ public class ServiceState implements Parcelable { } /** * Get current data service state * Get current data registration state. * * @see #STATE_IN_SERVICE * @see #STATE_OUT_OF_SERVICE * @see #STATE_EMERGENCY_ONLY * @see #STATE_POWER_OFF * * @return current data registration state * * @hide */ @UnsupportedAppUsage Loading @@ -544,6 +554,23 @@ public class ServiceState implements Parcelable { return mDataRegState; } /** * Get current data registration state. * * @see #STATE_IN_SERVICE * @see #STATE_OUT_OF_SERVICE * @see #STATE_EMERGENCY_ONLY * @see #STATE_POWER_OFF * * @return current data registration state * * @hide */ @SystemApi public @RegState int getDataRegistrationState() { return getDataRegState(); } /** * Get the current duplex mode * Loading Loading @@ -1437,7 +1464,15 @@ public class ServiceState implements Parcelable { return getRilDataRadioTechnology(); } /** @hide */ /** * Transform RIL radio technology {@link RilRadioTechnology} value to Network * type {@link NetworkType}. * * @param rat The RIL radio technology {@link RilRadioTechnology}. * @return The network type {@link NetworkType}. * * @hide */ public static int rilRadioTechnologyToNetworkType(@RilRadioTechnology int rat) { switch(rat) { case RIL_RADIO_TECHNOLOGY_GPRS: Loading Loading @@ -1519,7 +1554,15 @@ public class ServiceState implements Parcelable { } } /** @hide */ /** * Transform network type {@link NetworkType} value to RIL radio technology * {@link RilRadioTechnology}. * * @param networkType The network type {@link NetworkType}. * @return The RIL radio technology {@link RilRadioTechnology}. * * @hide */ public static int networkTypeToRilRadioTechnology(int networkType) { switch(networkType) { case TelephonyManager.NETWORK_TYPE_GPRS: Loading Loading @@ -1720,7 +1763,14 @@ public class ServiceState implements Parcelable { return bearerBitmask; } /** @hide */ /** * Convert network type bitmask to bearer bitmask. * * @param networkTypeBitmask The network type bitmask value * @return The bearer bitmask value. * * @hide */ public static int convertNetworkTypeBitmaskToBearerBitmask(int networkTypeBitmask) { if (networkTypeBitmask == 0) { return 0; Loading @@ -1734,7 +1784,14 @@ public class ServiceState implements Parcelable { return bearerBitmask; } /** @hide */ /** * Convert bearer bitmask to network type bitmask. * * @param bearerBitmask The bearer bitmask value. * @return The network type bitmask value. * * @hide */ public static int convertBearerBitmaskToNetworkTypeBitmask(int bearerBitmask) { if (bearerBitmask == 0) { return 0; Loading