Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4180288 authored by Nathan Harold's avatar Nathan Harold
Browse files

Skip sanitizing location info for Null Barring CID

If the CellIdentity in BarringInfo is null, then it
doesn't need to be location-info sanitized before
being provided.

Bug: 148695512
Test: atest CarrierApiTest
Merged-In: I8db108a91bcfcdefb48ff3779d972e126bc1d7d2
Change-Id: I8db108a91bcfcdefb48ff3779d972e126bc1d7d2
(cherry picked from commit 5f8ab168)
parent e3adb3a0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
    }