Deep copy service state object

The entire service state should be deep copied, instead of shallow
copied to the other object.

Fix: 174306612
Test: Manual
Merged-In: Ib6ad4ba26653ce5faad1e118a28d8be51435676c
Change-Id: Ib6ad4ba26653ce5faad1e118a28d8be51435676c
(cherry picked from commit 579f130ee3)
This commit is contained in:
Jack Yu
2021-08-27 00:44:42 -07:00
parent 56cff2cee0
commit aa150426de

View File

@@ -444,7 +444,9 @@ public class ServiceState implements Parcelable {
mArfcnRsrpBoost = s.mArfcnRsrpBoost;
synchronized (mNetworkRegistrationInfos) {
mNetworkRegistrationInfos.clear();
mNetworkRegistrationInfos.addAll(s.getNetworkRegistrationInfoList());
for (NetworkRegistrationInfo nri : s.getNetworkRegistrationInfoList()) {
mNetworkRegistrationInfos.add(new NetworkRegistrationInfo(nri));
}
}
mNrFrequencyRange = s.mNrFrequencyRange;
mOperatorAlphaLongRaw = s.mOperatorAlphaLongRaw;