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
Merged-In: I5c58322ebcec8886405e25e09754c7f154187efe
Change-Id: I5c58322ebcec8886405e25e09754c7f154187efe
(cherry picked from commit 3f7dfb8239)
This commit is contained in:
@@ -279,6 +279,7 @@ public final class CellIdentityCdma extends CellIdentity {
|
||||
mLongitude = in.readInt();
|
||||
mLatitude = in.readInt();
|
||||
|
||||
updateGlobalCellId();
|
||||
if (DBG) log(toString());
|
||||
}
|
||||
|
||||
|
||||
@@ -323,6 +323,7 @@ public final class CellIdentityGsm extends CellIdentity {
|
||||
mBsic = in.readInt();
|
||||
mAdditionalPlmns = (ArraySet<String>) in.readArraySet(null);
|
||||
|
||||
updateGlobalCellId();
|
||||
if (DBG) log(toString());
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -336,6 +336,8 @@ public final class CellIdentityWcdma extends CellIdentity {
|
||||
mUarfcn = in.readInt();
|
||||
mAdditionalPlmns = (ArraySet<String>) in.readArraySet(null);
|
||||
mCsgInfo = in.readParcelable(null);
|
||||
|
||||
updateGlobalCellId();
|
||||
if (DBG) log(toString());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user