summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hall Liu <hallliu@google.com> 2020-01-15 11:16:09 -0800
committer android-build-merger <android-build-merger@google.com> 2020-01-15 11:16:09 -0800
commit370a934081810268bcd5be7ec9a10ef9da3813ca (patch)
tree85894dfe522b7864d9711281c767ef46e7a57ff2
parentcd54c586bbaf765d13b007ee9caad439af6b0c94 (diff)
parent38fa60b5113c644a8ae7ae00e3724c3f44666797 (diff)
Merge "Expose ServiceState#getDataNetworkType as SystemApi"
am: 38fa60b511 Change-Id: I3880263af615171a14600383540a673d8ec4e347
-rwxr-xr-xapi/system-current.txt1
-rw-r--r--api/test-current.txt1
-rw-r--r--telephony/java/android/telephony/ServiceState.java3
3 files changed, 4 insertions, 1 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index ba1629c59dc3..4afb29b45a55 100755
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -8986,6 +8986,7 @@ package android.telephony {
public class ServiceState implements android.os.Parcelable {
method @NonNull public android.telephony.ServiceState createLocationInfoSanitizedCopy(boolean);
method public void fillInNotifierBundle(@NonNull android.os.Bundle);
+ method public int getDataNetworkType();
method public int getDataRegistrationState();
method @Nullable public android.telephony.NetworkRegistrationInfo getNetworkRegistrationInfo(int, int);
method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoList();
diff --git a/api/test-current.txt b/api/test-current.txt
index c1b997aa2fe8..2a4af615e86c 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -3018,6 +3018,7 @@ package android.telephony {
public class ServiceState implements android.os.Parcelable {
method public void addNetworkRegistrationInfo(android.telephony.NetworkRegistrationInfo);
+ method public int getDataNetworkType();
method public void setCdmaSystemAndNetworkId(int, int);
method public void setCellBandwidths(int[]);
method public void setChannelNumber(int);
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 2c62d0667e19..ad8ac76642ae 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -1624,7 +1624,8 @@ public class ServiceState implements Parcelable {
* @return Current data network type
* @hide
*/
- @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
+ @SystemApi
+ @TestApi
public @NetworkType int getDataNetworkType() {
final NetworkRegistrationInfo iwlanRegInfo = getNetworkRegistrationInfo(
NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WLAN);