diff options
| author | 2019-02-28 05:27:29 -0800 | |
|---|---|---|
| committer | 2019-02-28 05:27:29 -0800 | |
| commit | 0fed0f97a600a9c65487f5f13602c8c7582a559c (patch) | |
| tree | ff5fe0ec21edf876a8ee2b432bfc5f97bbc2d0c9 | |
| parent | 77864f7dac511626a197bf2592470aaed5ef3d35 (diff) | |
| parent | 6549c555239fc6495a88dcb8cc116ba799ef98de (diff) | |
Merge "Update annotations for UiccCardInfo APIs" am: c76c5529bf
am: 6549c55523
Change-Id: I6486a387f05994c88b90d437f539fc401f56603b
| -rwxr-xr-x | api/current.txt | 6 | ||||
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 1 | ||||
| -rw-r--r-- | telephony/java/android/telephony/UiccCardInfo.java | 9 |
3 files changed, 11 insertions, 5 deletions
diff --git a/api/current.txt b/api/current.txt index 8ef85136fbf8..ae0ba1d93561 100755 --- a/api/current.txt +++ b/api/current.txt @@ -43070,7 +43070,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getSubscriberId(); method public String getTypeAllocationCode(); method public String getTypeAllocationCode(int); - method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public java.util.List<android.telephony.UiccCardInfo> getUiccCardsInfo(); + method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") @NonNull public java.util.List<android.telephony.UiccCardInfo> getUiccCardsInfo(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVisualVoicemailPackageName(); method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVoiceMailAlphaTag(); method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVoiceMailNumber(); @@ -43239,8 +43239,8 @@ package android.telephony { public final class UiccCardInfo implements android.os.Parcelable { method public int describeContents(); method public int getCardId(); - method public String getEid(); - method public String getIccId(); + method @Nullable public String getEid(); + method @Nullable public String getIccId(); method public int getSlotIndex(); method public boolean isEuicc(); method public boolean isRemovable(); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index e6ae941dc589..7a9372da8b70 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -3203,6 +3203,7 @@ public class TelephonyManager { * the caller does not have adequate permissions for that card. */ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) + @NonNull public List<UiccCardInfo> getUiccCardsInfo() { try { ITelephony telephony = getITelephony(); diff --git a/telephony/java/android/telephony/UiccCardInfo.java b/telephony/java/android/telephony/UiccCardInfo.java index 0192ffbe263c..d95a4992f808 100644 --- a/telephony/java/android/telephony/UiccCardInfo.java +++ b/telephony/java/android/telephony/UiccCardInfo.java @@ -15,6 +15,8 @@ */ package android.telephony; +import android.annotation.NonNull; +import android.annotation.Nullable; import android.os.Parcel; import android.os.Parcelable; @@ -104,6 +106,7 @@ public final class UiccCardInfo implements Parcelable { * Note that this field may be omitted if the caller does not have the correct permissions * (see {@link TelephonyManager#getUiccCardsInfo()}). */ + @Nullable public String getEid() { if (!mIsEuicc) { return null; @@ -117,6 +120,7 @@ public final class UiccCardInfo implements Parcelable { * Note that this field may be omitted if the caller does not have the correct permissions * (see {@link TelephonyManager#getUiccCardsInfo()}). */ + @Nullable public String getIccId() { return mIccId; } @@ -129,11 +133,12 @@ public final class UiccCardInfo implements Parcelable { } /** - * Returns a copy of the UiccCardinfo with the clears the EID and ICCID set to null. These - * values are generally private and require carrier privileges to view. + * Returns a copy of the UiccCardinfo with the EID and ICCID set to null. These values are + * generally private and require carrier privileges to view. * * @hide */ + @NonNull public UiccCardInfo getUnprivileged() { return new UiccCardInfo(mIsEuicc, mCardId, null, null, mSlotIndex, mIsRemovable); } |