Loading api/system-current.txt +5 −2 Original line number Diff line number Diff line Loading @@ -5138,9 +5138,12 @@ package android.telephony { } public class ServiceState implements android.os.Parcelable { method public android.telephony.NetworkRegistrationState getNetworkRegistrationState(int, int); method public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStates(); method public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStates(int); method public android.telephony.NetworkRegistrationState getNetworkRegistrationStates(int, int); method public deprecated java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStates(int); method public deprecated android.telephony.NetworkRegistrationState getNetworkRegistrationStates(int, int); method public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStatesFromDomain(int); method public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStatesFromTransportType(int); } public final class SmsManager { Loading telephony/java/android/telephony/ServiceState.java +68 −11 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.NetworkRegistrationState.Domain; import android.text.TextUtils; import java.lang.annotation.Retention; Loading Loading @@ -1595,7 +1596,7 @@ public class ServiceState implements Parcelable { /** * Get all of the available network registration states. * * @return List of registration states * @return List of {@link NetworkRegistrationState} * @hide */ @SystemApi Loading @@ -1606,14 +1607,30 @@ public class ServiceState implements Parcelable { } /** * Get the network registration states with given transport type. * Get the network registration states from transport type. * * @param transportType The transport type. See {@link AccessNetworkConstants.TransportType} * @return List of registration states. * @param transportType The {@link AccessNetworkConstants.TransportType transport type} * @return List of {@link NetworkRegistrationState} * @hide * * @deprecated Use {@link #getNetworkRegistrationStatesFromTransportType(int)} */ @Deprecated @SystemApi public List<NetworkRegistrationState> getNetworkRegistrationStates(int transportType) { return getNetworkRegistrationStatesFromTransportType(transportType); } /** * Get the network registration states from transport type. * * @param transportType The {@link AccessNetworkConstants.TransportType transport type} * @return List of {@link NetworkRegistrationState} * @hide */ @SystemApi public List<NetworkRegistrationState> getNetworkRegistrationStatesFromTransportType( int transportType) { List<NetworkRegistrationState> list = new ArrayList<>(); synchronized (mNetworkRegistrationStates) { Loading @@ -1628,16 +1645,57 @@ public class ServiceState implements Parcelable { } /** * Get the network registration states with given transport type and domain. * Get the network registration states from network domain. * * @param domain The network domain. Must be {@link NetworkRegistrationState#DOMAIN_CS} or * {@link NetworkRegistrationState#DOMAIN_PS}. * @param transportType The transport type. See {@link AccessNetworkConstants.TransportType} * @return The matching NetworkRegistrationState. * @param domain The network {@link NetworkRegistrationState.Domain domain} * @return List of {@link NetworkRegistrationState} * @hide */ @SystemApi public NetworkRegistrationState getNetworkRegistrationStates(int domain, int transportType) { public List<NetworkRegistrationState> getNetworkRegistrationStatesFromDomain( @Domain int domain) { List<NetworkRegistrationState> list = new ArrayList<>(); synchronized (mNetworkRegistrationStates) { for (NetworkRegistrationState networkRegistrationState : mNetworkRegistrationStates) { if (networkRegistrationState.getDomain() == domain) { list.add(networkRegistrationState); } } } return list; } /** * Get the network registration state from transport type and network domain. * * @param domain The network {@link NetworkRegistrationState.Domain domain} * @param transportType The {@link AccessNetworkConstants.TransportType transport type} * @return The matching {@link NetworkRegistrationState} * @hide * * @deprecated Use {@link #getNetworkRegistrationState(int, int)} */ @Deprecated @SystemApi public NetworkRegistrationState getNetworkRegistrationStates(@Domain int domain, int transportType) { return getNetworkRegistrationState(domain, transportType); } /** * Get the network registration state from transport type and network domain. * * @param domain The network {@link NetworkRegistrationState.Domain domain} * @param transportType The {@link AccessNetworkConstants.TransportType transport type} * @return The matching {@link NetworkRegistrationState} * @hide * */ @SystemApi public NetworkRegistrationState getNetworkRegistrationState(@Domain int domain, int transportType) { synchronized (mNetworkRegistrationStates) { for (NetworkRegistrationState networkRegistrationState : mNetworkRegistrationStates) { if (networkRegistrationState.getTransportType() == transportType Loading Loading @@ -1669,5 +1727,4 @@ public class ServiceState implements Parcelable { mNetworkRegistrationStates.add(regState); } } } Loading
api/system-current.txt +5 −2 Original line number Diff line number Diff line Loading @@ -5138,9 +5138,12 @@ package android.telephony { } public class ServiceState implements android.os.Parcelable { method public android.telephony.NetworkRegistrationState getNetworkRegistrationState(int, int); method public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStates(); method public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStates(int); method public android.telephony.NetworkRegistrationState getNetworkRegistrationStates(int, int); method public deprecated java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStates(int); method public deprecated android.telephony.NetworkRegistrationState getNetworkRegistrationStates(int, int); method public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStatesFromDomain(int); method public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStatesFromTransportType(int); } public final class SmsManager { Loading
telephony/java/android/telephony/ServiceState.java +68 −11 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.NetworkRegistrationState.Domain; import android.text.TextUtils; import java.lang.annotation.Retention; Loading Loading @@ -1595,7 +1596,7 @@ public class ServiceState implements Parcelable { /** * Get all of the available network registration states. * * @return List of registration states * @return List of {@link NetworkRegistrationState} * @hide */ @SystemApi Loading @@ -1606,14 +1607,30 @@ public class ServiceState implements Parcelable { } /** * Get the network registration states with given transport type. * Get the network registration states from transport type. * * @param transportType The transport type. See {@link AccessNetworkConstants.TransportType} * @return List of registration states. * @param transportType The {@link AccessNetworkConstants.TransportType transport type} * @return List of {@link NetworkRegistrationState} * @hide * * @deprecated Use {@link #getNetworkRegistrationStatesFromTransportType(int)} */ @Deprecated @SystemApi public List<NetworkRegistrationState> getNetworkRegistrationStates(int transportType) { return getNetworkRegistrationStatesFromTransportType(transportType); } /** * Get the network registration states from transport type. * * @param transportType The {@link AccessNetworkConstants.TransportType transport type} * @return List of {@link NetworkRegistrationState} * @hide */ @SystemApi public List<NetworkRegistrationState> getNetworkRegistrationStatesFromTransportType( int transportType) { List<NetworkRegistrationState> list = new ArrayList<>(); synchronized (mNetworkRegistrationStates) { Loading @@ -1628,16 +1645,57 @@ public class ServiceState implements Parcelable { } /** * Get the network registration states with given transport type and domain. * Get the network registration states from network domain. * * @param domain The network domain. Must be {@link NetworkRegistrationState#DOMAIN_CS} or * {@link NetworkRegistrationState#DOMAIN_PS}. * @param transportType The transport type. See {@link AccessNetworkConstants.TransportType} * @return The matching NetworkRegistrationState. * @param domain The network {@link NetworkRegistrationState.Domain domain} * @return List of {@link NetworkRegistrationState} * @hide */ @SystemApi public NetworkRegistrationState getNetworkRegistrationStates(int domain, int transportType) { public List<NetworkRegistrationState> getNetworkRegistrationStatesFromDomain( @Domain int domain) { List<NetworkRegistrationState> list = new ArrayList<>(); synchronized (mNetworkRegistrationStates) { for (NetworkRegistrationState networkRegistrationState : mNetworkRegistrationStates) { if (networkRegistrationState.getDomain() == domain) { list.add(networkRegistrationState); } } } return list; } /** * Get the network registration state from transport type and network domain. * * @param domain The network {@link NetworkRegistrationState.Domain domain} * @param transportType The {@link AccessNetworkConstants.TransportType transport type} * @return The matching {@link NetworkRegistrationState} * @hide * * @deprecated Use {@link #getNetworkRegistrationState(int, int)} */ @Deprecated @SystemApi public NetworkRegistrationState getNetworkRegistrationStates(@Domain int domain, int transportType) { return getNetworkRegistrationState(domain, transportType); } /** * Get the network registration state from transport type and network domain. * * @param domain The network {@link NetworkRegistrationState.Domain domain} * @param transportType The {@link AccessNetworkConstants.TransportType transport type} * @return The matching {@link NetworkRegistrationState} * @hide * */ @SystemApi public NetworkRegistrationState getNetworkRegistrationState(@Domain int domain, int transportType) { synchronized (mNetworkRegistrationStates) { for (NetworkRegistrationState networkRegistrationState : mNetworkRegistrationStates) { if (networkRegistrationState.getTransportType() == transportType Loading Loading @@ -1669,5 +1727,4 @@ public class ServiceState implements Parcelable { mNetworkRegistrationStates.add(regState); } } }