OSDN Git Service

add missing annotation for TelephonyManager APIs
authorchen xu <fionaxu@google.com>
Sun, 3 Mar 2019 23:57:12 +0000 (15:57 -0800)
committerchen xu <fionaxu@google.com>
Mon, 4 Mar 2019 23:43:21 +0000 (15:43 -0800)
Bug: 126702627
Test: Build
Change-Id: I39cb57db7cc1105bf74eb18ecf15ddbdc6e44f0c
Merged-in: I39cb57db7cc1105bf74eb18ecf15ddbdc6e44f0c

api/current.txt
api/system-current.txt
telephony/java/android/telephony/TelephonyManager.java

index 28fcac4..3ca7ffe 100755 (executable)
@@ -43042,8 +43042,8 @@ package android.telephony {
     method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getImei();
     method @RequiresPermission(android.Manifest.permission.READ_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.Manifest.permission.READ_PHONE_STATE) public String getMeid();
     method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getMeid(int);
     method public String getMmsUAProfUrl();
@@ -43070,8 +43070,8 @@ package android.telephony {
     method public int getSimState();
     method public int getSimState(int);
     method @RequiresPermission(android.Manifest.permission.READ_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();
index 41d8eea..808179c 100644 (file)
@@ -6364,7 +6364,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();
index 6aa4266..6da0358 100644 (file)
@@ -1539,6 +1539,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());
     }
@@ -1549,6 +1550,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;
@@ -1601,6 +1603,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());
     }
@@ -1611,6 +1614,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;
@@ -5981,6 +5985,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() {