Loading telephony/java/android/telephony/ServiceState.java +13 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.os.Parcel; import android.os.Parcelable; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.NetworkRegistrationState.Domain; import android.telephony.NetworkRegistrationState.NRStatus; import android.text.TextUtils; import java.lang.annotation.Retention; Loading Loading @@ -1358,6 +1359,18 @@ public class ServiceState implements Parcelable { return mNrFrequencyRange; } /** * Get the NR 5G status of the mobile data network. * @return the NR 5G status. * @hide */ public @NRStatus int getNrStatus() { final NetworkRegistrationState regState = getNetworkRegistrationState( NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TransportType.WWAN); if (regState == null) return NetworkRegistrationState.NR_STATUS_NONE; return regState.getNrStatus(); } /** * @param nrFrequencyRange the frequency range of 5G NR. * @hide Loading Loading @@ -1534,7 +1547,6 @@ public class ServiceState implements Parcelable { } } /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) public @TelephonyManager.NetworkType int getDataNetworkType() { Loading Loading
telephony/java/android/telephony/ServiceState.java +13 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.os.Parcel; import android.os.Parcelable; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.NetworkRegistrationState.Domain; import android.telephony.NetworkRegistrationState.NRStatus; import android.text.TextUtils; import java.lang.annotation.Retention; Loading Loading @@ -1358,6 +1359,18 @@ public class ServiceState implements Parcelable { return mNrFrequencyRange; } /** * Get the NR 5G status of the mobile data network. * @return the NR 5G status. * @hide */ public @NRStatus int getNrStatus() { final NetworkRegistrationState regState = getNetworkRegistrationState( NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TransportType.WWAN); if (regState == null) return NetworkRegistrationState.NR_STATUS_NONE; return regState.getNrStatus(); } /** * @param nrFrequencyRange the frequency range of 5G NR. * @hide Loading Loading @@ -1534,7 +1547,6 @@ public class ServiceState implements Parcelable { } } /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) public @TelephonyManager.NetworkType int getDataNetworkType() { Loading