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

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

Always provide CellIdentity in NetworkRegistrationInfo

Always return the CellIdentity, if available in NRI. Even
when the caller does not have / renounces location usage,
there is useful info in the CellIdentity, in particular the
PLMN-ID and the band(s) that the cell is using. Because
band info is supplied by the cell's broadcast info, this is
the only place where it can be retrieved.

Bug: 357159744
Test: atest NetworkRegistrationInfoTest#testSanitizeLocationInfo
Test: basic sanity test (voice, messaging, data)
Flag: EXEMPT bugfix
Change-Id: I0a424fdc67d1452a4a11a20980672841543c16ac
parent 4c08de62
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -218,14 +218,31 @@ public abstract class CellIdentity implements Parcelable {

    /**
     * @return a CellLocation object for this CellIdentity
     *
     * @hide
     */
    @SystemApi
    public abstract @NonNull CellLocation asCellLocation();

    /**
     * Create and a return a new instance of CellIdentity with location-identifying information
     * removed.
     * Create and a return a new instance of CellIdentity with precise location-identifying
     * information removed.
     *
     * Coarse-level location information that will be retained:
     * <p><ul>
     * <li> Country code (MCC)
     * <li> Network Identifier / Network Code (MNC)
     * <li> Band Information
     * <li> Network Alpha Tag (long, short)
     * </ul><p>
     *
     * Fine-level information that will be redacted:
     * <p><ul>
     * <li> Unique cell ID (Cell-ID, CGI, ECGI)
     * <li> Tracking area information (RAI, LAI, TAI)
     * <li> Channel information (ARFCN, UARFCN, EARFCN, NRARFCN)
     * <li> Physical cell ID (BSIC, PCI)
     * </ul><p>
     *
     * @hide
     */
+1 −1
Original line number Diff line number Diff line
@@ -951,7 +951,7 @@ public final class NetworkRegistrationInfo implements Parcelable {
     */
    public NetworkRegistrationInfo sanitizeLocationInfo() {
        NetworkRegistrationInfo result = copy();
        result.mCellIdentity = null;
        if (mCellIdentity != null) result.mCellIdentity = mCellIdentity.sanitizeLocationInfo();
        return result;
    }