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

Commit 3f7dfb82 authored by Nathan Harold's avatar Nathan Harold
Browse files

Update GlobalCellId during Un-parceling

The Global Cell-ID is constructed from other
fields in each CellIdentity.

Currently, it is not stored during parceling.
Thus, after a CellId is parceled and unparceled
this value is being lost.

Do a quick fix to update the global Cell ID during
unparceling. A longer-term fix is to resolve the
layering violations that create the situation where
the global Cell ID is defined in the base class
but manipulated in the derived classes.

Fixes a broken unit test.

Bug: 154955167
Test: atest ServiceStateTrackerTest#testRatRatchet
Change-Id: I5c58322ebcec8886405e25e09754c7f154187efe
parent f7d789b0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -279,6 +279,7 @@ public final class CellIdentityCdma extends CellIdentity {
        mLongitude = in.readInt();
        mLatitude = in.readInt();

        updateGlobalCellId();
        if (DBG) log(toString());
    }

+1 −0
Original line number Diff line number Diff line
@@ -323,6 +323,7 @@ public final class CellIdentityGsm extends CellIdentity {
        mBsic = in.readInt();
        mAdditionalPlmns = (ArraySet<String>) in.readArraySet(null);

        updateGlobalCellId();
        if (DBG) log(toString());
    }

+2 −0
Original line number Diff line number Diff line
@@ -403,6 +403,8 @@ public final class CellIdentityLte extends CellIdentity {
        mBandwidth = in.readInt();
        mAdditionalPlmns = (ArraySet<String>) in.readArraySet(null);
        mCsgInfo = in.readParcelable(null);

        updateGlobalCellId();
        if (DBG) log(toString());
    }

+2 −0
Original line number Diff line number Diff line
@@ -273,6 +273,8 @@ public final class CellIdentityNr extends CellIdentity {
        mBands = in.createIntArray();
        mNci = in.readLong();
        mAdditionalPlmns = (ArraySet<String>) in.readArraySet(null);

        updateGlobalCellId();
    }

    /** Implement the Parcelable interface */
+2 −0
Original line number Diff line number Diff line
@@ -321,6 +321,8 @@ public final class CellIdentityTdscdma extends CellIdentity {
        mUarfcn = in.readInt();
        mAdditionalPlmns = (ArraySet<String>) in.readArraySet(null);
        mCsgInfo = in.readParcelable(null);

        updateGlobalCellId();
        if (DBG) log(toString());
    }

Loading