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

Commit cbcfe8ef authored by Ying Xu's avatar Ying Xu Committed by Automerger Merge Worker
Browse files

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

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I92d2bf0828fa2f548850acb1f11fea7816d6087b
parents f46f3045 012ce26c
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -316,13 +316,25 @@ 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()));
            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()));
            }
        }
    }

    private boolean hasCorrectSubs(List<SubscriptionInfo> subs) {
        final int N = subs.size();