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

Commit 69e53926 authored by Sarah Chin's avatar Sarah Chin
Browse files

Add ncid to CellLocation in CellIdentityNr

Update GsmCellLocation documentation for NR case. Since the NR cell ID
is 36 bits and can't fit into the 32-bit field in GsmCellLocation,
return -1 for the CID.

Test: atest CellIdentityNrTest
Bug: 166514842
Change-Id: Ib894e83900b590c11221502ad039781cea5b571c
parent 6e43615a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -126,7 +126,11 @@ public final class CellIdentityNr extends CellIdentity {
    @NonNull
    @Override
    public CellLocation asCellLocation() {
        return new GsmCellLocation();
        GsmCellLocation cl = new GsmCellLocation();
        int tac = mTac != CellInfo.UNAVAILABLE ? mTac : -1;
        cl.setLacAndCid(tac, -1);
        cl.setPsc(0);
        return cl;
    }

    @Override
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public class GsmCellLocation extends CellLocation {
    }

    /**
     * @return gsm cell id, -1 if unknown, 0xffff max legal value
     * @return gsm cell id, -1 if unknown or invalid, 0xffff max legal value
     */
    public int getCid() {
        return mCid;