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

Commit 5b4ad4fa authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Allow requestNetworkScan to return sanitized info am: c9d74306 am: 87217889

am: 9e1d425b

Change-Id: I3fab8c08100a68aba55eefb27b587e73849bc108
parents 4fb4320a 9e1d425b
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -109,6 +109,22 @@ public abstract class CellIdentity implements Parcelable {
        return mType;
    }

    /**
     * @return MCC or null for CDMA
     * @hide
     */
    public String getMccString() {
        return mMccStr;
    }

    /**
     * @return MNC or null for CDMA
     * @hide
     */
    public String getMncString() {
        return mMncStr;
    }

    /**
     * Returns the channel number of the cell identity.
     *
+7 −0
Original line number Diff line number Diff line
@@ -109,6 +109,13 @@ public final class CellIdentityCdma extends CellIdentity {
        return new CellIdentityCdma(this);
    }

    /** @hide */
    public CellIdentityCdma sanitizeLocationInfo() {
        return new CellIdentityCdma(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
                CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
                mAlphaLong, mAlphaShort);
    }

    /**
     * Take the latitude and longitude in 1/4 seconds and see if
     * the reported location is on Null Island.
+6 −0
Original line number Diff line number Diff line
@@ -97,6 +97,12 @@ public final class CellIdentityGsm extends CellIdentity {
        return new CellIdentityGsm(this);
    }

    /** @hide */
    public CellIdentityGsm sanitizeLocationInfo() {
        return new CellIdentityGsm(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
                CellInfo.UNAVAILABLE, mMccStr, mMncStr, mAlphaLong, mAlphaShort);
    }

    /**
     * @return 3-digit Mobile Country Code, 0..999,
     *         {@link android.telephony.CellInfo#UNAVAILABLE UNAVAILABLE} if unavailable.
+7 −0
Original line number Diff line number Diff line
@@ -113,6 +113,13 @@ public final class CellIdentityLte extends CellIdentity {
                cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort);
    }

    /** @hide */
    public CellIdentityLte sanitizeLocationInfo() {
        return new CellIdentityLte(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
                CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
                mMccStr, mMncStr, mAlphaLong, mAlphaShort);
    }

    CellIdentityLte copy() {
        return new CellIdentityLte(this);
    }
+7 −1
Original line number Diff line number Diff line
@@ -55,6 +55,12 @@ public final class CellIdentityNr extends CellIdentity {
        mNci = nci;
    }

    /** @hide */
    public CellIdentityNr sanitizeLocationInfo() {
        return new CellIdentityNr(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
                mMccStr, mMncStr, CellInfo.UNAVAILABLE, mAlphaLong, mAlphaShort);
    }

    /**
     * @return a CellLocation object for this CellIdentity.
     * @hide
Loading