diff --git a/telephony/java/android/telephony/BarringInfo.java b/telephony/java/android/telephony/BarringInfo.java index db3da17b6c050..92423a2f2218e 100644 --- a/telephony/java/android/telephony/BarringInfo.java +++ b/telephony/java/android/telephony/BarringInfo.java @@ -324,6 +324,9 @@ public final class BarringInfo implements Parcelable { /** @hide */ @SystemApi public @NonNull BarringInfo createLocationInfoSanitizedCopy() { + // The only thing that would need sanitizing is the CellIdentity + if (mCellIdentity == null) return this; + return new BarringInfo(mCellIdentity.sanitizeLocationInfo(), mBarringServiceInfos); }