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

Commit 012ce26c 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

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9b5d6b251e58f76f53fc58719f0b073455577ef6
parents 0add9bb3 b1d600fe
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();