OSDN Git Service

Annotate getMobileNetworkOperator() as Nullable
authorNathan Harold <nharold@google.com>
Tue, 18 Dec 2018 21:40:08 +0000 (13:40 -0800)
committerNathan Harold <nharold@google.com>
Tue, 18 Dec 2018 21:41:25 +0000 (13:41 -0800)
Add Nullable annotations for the classes that support
getMobileNetworkOperator().

Bug: 118675404
Test: compilation (no functional change)
Change-Id: I914ec8242aff2f578dfe1f97f2e7cfe2d109c7dc

telephony/java/android/telephony/CellIdentityGsm.java
telephony/java/android/telephony/CellIdentityLte.java
telephony/java/android/telephony/CellIdentityTdscdma.java
telephony/java/android/telephony/CellIdentityWcdma.java

index 04c28e5..c8a899b 100644 (file)
@@ -16,6 +16,7 @@
 
 package android.telephony;
 
+import android.annotation.Nullable;
 import android.annotation.UnsupportedAppUsage;
 import android.os.Parcel;
 import android.telephony.gsm.GsmCellLocation;
@@ -169,6 +170,7 @@ public final class CellIdentityGsm extends CellIdentity {
     /**
      * @return a 5 or 6 character string (MCC+MNC), null if any field is unknown.
      */
+    @Nullable
     public String getMobileNetworkOperator() {
         return (mMccStr == null || mMncStr == null) ? null : mMccStr + mMncStr;
     }
index 04b6a6c..8e1877d 100644 (file)
@@ -16,6 +16,7 @@
 
 package android.telephony;
 
+import android.annotation.Nullable;
 import android.annotation.UnsupportedAppUsage;
 import android.os.Parcel;
 import android.telephony.gsm.GsmCellLocation;
@@ -197,6 +198,7 @@ public final class CellIdentityLte extends CellIdentity {
     /**
      * @return a 5 or 6 character string (MCC+MNC), null if any field is unknown.
      */
+    @Nullable
     public String getMobileNetworkOperator() {
         return (mMccStr == null || mMncStr == null) ? null : mMccStr + mMncStr;
     }
index 8b1c1b9..f77c468 100644 (file)
@@ -16,6 +16,7 @@
 
 package android.telephony;
 
+import android.annotation.Nullable;
 import android.os.Parcel;
 import android.telephony.gsm.GsmCellLocation;
 
@@ -116,6 +117,7 @@ public final class CellIdentityTdscdma extends CellIdentity {
     /**
      * @return a 5 or 6 character string (MCC+MNC), null if any field is unknown
      */
+    @Nullable
     public String getMobileNetworkOperator() {
         return (mMccStr == null || mMncStr == null) ? null : mMccStr + mMncStr;
     }
index 3416ffe..31f9e6d 100644 (file)
@@ -16,6 +16,7 @@
 
 package android.telephony;
 
+import android.annotation.Nullable;
 import android.annotation.UnsupportedAppUsage;
 import android.os.Parcel;
 import android.telephony.gsm.GsmCellLocation;
@@ -173,6 +174,7 @@ public final class CellIdentityWcdma extends CellIdentity {
     /**
      * @return a 5 or 6 character string (MCC+MNC), null if any field is unknown
      */
+    @Nullable
     public String getMobileNetworkOperator() {
         return (mMccStr == null || mMncStr == null) ? null : mMccStr + mMncStr;
     }