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

Commit b1d600fe authored by Ying Xu's avatar Ying Xu Committed by Android (Google) Code Review
Browse files

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

parents a06b20b4 200d3e76
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();