From 13d6b1198777da0c34d24b3b39e03689dc1f9384 Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Tue, 18 Dec 2018 13:40:08 -0800 Subject: [PATCH] Annotate getMobileNetworkOperator() as Nullable 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 | 2 ++ telephony/java/android/telephony/CellIdentityLte.java | 2 ++ telephony/java/android/telephony/CellIdentityTdscdma.java | 2 ++ telephony/java/android/telephony/CellIdentityWcdma.java | 2 ++ 4 files changed, 8 insertions(+) diff --git a/telephony/java/android/telephony/CellIdentityGsm.java b/telephony/java/android/telephony/CellIdentityGsm.java index 04c28e5211c8..c8a899b339c6 100644 --- a/telephony/java/android/telephony/CellIdentityGsm.java +++ b/telephony/java/android/telephony/CellIdentityGsm.java @@ -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; } diff --git a/telephony/java/android/telephony/CellIdentityLte.java b/telephony/java/android/telephony/CellIdentityLte.java index 04b6a6ca7fea..8e1877d8e35f 100644 --- a/telephony/java/android/telephony/CellIdentityLte.java +++ b/telephony/java/android/telephony/CellIdentityLte.java @@ -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; } diff --git a/telephony/java/android/telephony/CellIdentityTdscdma.java b/telephony/java/android/telephony/CellIdentityTdscdma.java index 8b1c1b9f024c..f77c468d2f5e 100644 --- a/telephony/java/android/telephony/CellIdentityTdscdma.java +++ b/telephony/java/android/telephony/CellIdentityTdscdma.java @@ -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; } diff --git a/telephony/java/android/telephony/CellIdentityWcdma.java b/telephony/java/android/telephony/CellIdentityWcdma.java index 3416ffe0b8f4..31f9e6d5bb90 100644 --- a/telephony/java/android/telephony/CellIdentityWcdma.java +++ b/telephony/java/android/telephony/CellIdentityWcdma.java @@ -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; } -- 2.11.0