Merge "Do not clear the existing no calling states" into sc-dev am: b1d600fead

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13428059

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9b5d6b251e58f76f53fc58719f0b073455577ef6
This commit is contained in:
Ying Xu
2021-02-02 00:08:41 +00:00
committed by Automerger Merge Worker

View File

@@ -316,11 +316,23 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
mIconController.removeAllIconsForSlot(mSlotMobile);
mMobileStates.clear();
List<NoCallingIconState> noCallingStates = new ArrayList<NoCallingIconState>();
noCallingStates.addAll(mNoCallingStates);
mNoCallingStates.clear();
final int n = subs.size();
for (int i = 0; i < n; i++) {
mMobileStates.add(new MobileIconState(subs.get(i).getSubscriptionId()));
mNoCallingStates.add(new NoCallingIconState(subs.get(i).getSubscriptionId()));
boolean isNewSub = true;
for (NoCallingIconState state : noCallingStates) {
if (state.subId == subs.get(i).getSubscriptionId()) {
mNoCallingStates.add(state);
isNewSub = false;
break;
}
}
if (isNewSub) {
mNoCallingStates.add(new NoCallingIconState(subs.get(i).getSubscriptionId()));
}
}
}