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
Change-Id: Ib6ad4ba26653ce5faad1e118a28d8be51435676c
This commit is contained in:
Jack Yu
2021-08-27 00:44:42 -07:00
parent fb5cb19551
commit 579f130ee3

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;