diff options
| author | 2019-03-03 15:57:12 -0800 | |
|---|---|---|
| committer | 2019-03-04 13:34:33 -0800 | |
| commit | 8be2a2ed14bb3d652fcf5a8ec1b1e4732ce817c0 (patch) | |
| tree | 980be545bebc3cd9fdce5fb5b21de0bebea4bf8e | |
| parent | 0718be8cfa86546f2e3b0b3fd90ee092e16775ae (diff) | |
add missing annotation for TelephonyManager APIs
Bug: 126702627
Test: Build
Change-Id: I39cb57db7cc1105bf74eb18ecf15ddbdc6e44f0c
| -rw-r--r-- | api/current.txt | 8 | ||||
| -rw-r--r-- | api/system-current.txt | 2 | ||||
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 5 |
3 files changed, 10 insertions, 5 deletions
diff --git a/api/current.txt b/api/current.txt index 21c29999faa6..0b4bc44576b8 100644 --- a/api/current.txt +++ b/api/current.txt @@ -45148,8 +45148,8 @@ package android.telephony { method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getImei(); method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getImei(int); method @RequiresPermission(anyOf={android.Manifest.permission.READ_PHONE_STATE, android.Manifest.permission.READ_SMS, android.Manifest.permission.READ_PHONE_NUMBERS}) public String getLine1Number(); - method public String getManufacturerCode(); - method public String getManufacturerCode(int); + method @Nullable public String getManufacturerCode(); + method @Nullable public String getManufacturerCode(int); method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getMeid(); method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getMeid(int); method public String getMmsUAProfUrl(); @@ -45176,8 +45176,8 @@ package android.telephony { method public int getSimState(); method public int getSimState(int); method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getSubscriberId(); - method public String getTypeAllocationCode(); - method public String getTypeAllocationCode(int); + method @Nullable public String getTypeAllocationCode(); + method @Nullable public String getTypeAllocationCode(int); 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(); diff --git a/api/system-current.txt b/api/system-current.txt index 375ce911cec0..276befc700b9 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -7949,7 +7949,7 @@ package android.telephony { method @Deprecated public boolean getDataEnabled(int); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean getEmergencyCallbackMode(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimDomain(); - method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimIst(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimIst(); method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<android.util.Pair<java.lang.Integer,java.lang.Integer>> getLogicalToPhysicalSlotMapping(); method public static long getMaxNumberVerificationTimeoutMillis(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getPreferredNetworkTypeBitmap(); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index cf2b1ea1cda8..bce6f17ebde0 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1566,6 +1566,7 @@ public class TelephonyManager { * Returns the Type Allocation Code from the IMEI. Return null if Type Allocation Code is not * available. */ + @Nullable public String getTypeAllocationCode() { return getTypeAllocationCode(getSlotIndex()); } @@ -1576,6 +1577,7 @@ public class TelephonyManager { * * @param slotIndex of which Type Allocation Code is returned */ + @Nullable public String getTypeAllocationCode(int slotIndex) { ITelephony telephony = getITelephony(); if (telephony == null) return null; @@ -1636,6 +1638,7 @@ public class TelephonyManager { * Returns the Manufacturer Code from the MEID. Return null if Manufacturer Code is not * available. */ + @Nullable public String getManufacturerCode() { return getManufacturerCode(getSlotIndex()); } @@ -1646,6 +1649,7 @@ public class TelephonyManager { * * @param slotIndex of which Type Allocation Code is returned */ + @Nullable public String getManufacturerCode(int slotIndex) { ITelephony telephony = getITelephony(); if (telephony == null) return null; @@ -6005,6 +6009,7 @@ public class TelephonyManager { * @return IMS Service Table or null if not present or not loaded * @hide */ + @Nullable @SystemApi @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimIst() { |