summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jack Yu <jackyu@google.com> 2019-03-06 01:38:29 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-03-06 01:38:29 +0000
commitda247eb54ea5d68be66c09c0bba1f55f66fda53b (patch)
treebe77fb72d5ab63b60f2d3a18ea82a815f5516769
parentd4f756e85656fc4af9a36111c99fb0398e7a02c7 (diff)
parent1eb3f0cdaed5a7156e9dcb11223f7f4ac82f1360 (diff)
Merge "Added annotations to the API"
-rw-r--r--api/system-current.txt6
-rw-r--r--telephony/java/android/telephony/data/DataProfile.java5
2 files changed, 8 insertions, 3 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index cf40ec393cc6..d504d0c17a28 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -8115,19 +8115,19 @@ package android.telephony.data {
}
public final class DataProfile implements android.os.Parcelable {
- method public String getApn();
+ method @NonNull public String getApn();
method public int getAuthType();
method public int getBearerBitmap();
method public int getMaxConns();
method public int getMaxConnsTime();
method public int getMtu();
- method public String getPassword();
+ method @Nullable public String getPassword();
method public int getProfileId();
method public int getProtocol();
method public int getRoamingProtocol();
method public int getSupportedApnTypesBitmap();
method public int getType();
- method public String getUserName();
+ method @Nullable public String getUserName();
method public int getWaitTime();
method public boolean isEnabled();
method public boolean isPersistent();
diff --git a/telephony/java/android/telephony/data/DataProfile.java b/telephony/java/android/telephony/data/DataProfile.java
index f45954bb390f..332aae156149 100644
--- a/telephony/java/android/telephony/data/DataProfile.java
+++ b/telephony/java/android/telephony/data/DataProfile.java
@@ -19,6 +19,8 @@ package android.telephony.data;
import static android.telephony.data.ApnSetting.ProtocolType;
import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Build;
import android.os.Parcel;
@@ -158,6 +160,7 @@ public final class DataProfile implements Parcelable {
/**
* @return The APN to establish data connection.
*/
+ @NonNull
public String getApn() { return mApn; }
/**
@@ -173,11 +176,13 @@ public final class DataProfile implements Parcelable {
/**
* @return The username for APN. Can be null.
*/
+ @Nullable
public String getUserName() { return mUserName; }
/**
* @return The password for APN. Can be null.
*/
+ @Nullable
public String getPassword() { return mPassword; }
/**