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

Commit 814fbaf8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixed phone switcher crash" into sc-dev

parents 7ded0192 98bc007b
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -824,10 +824,13 @@ public class PhoneSwitcher extends Handler {

        mPhoneSubscriptions = copyOf(mPhoneSubscriptions, mActiveModemCount);
        mPhoneStates = copyOf(mPhoneStates, mActiveModemCount);
        //clear the list in case of multisim config change
        mCurrentDdsSwitchFailure.clear();

        // Single SIM -> dual SIM switch.
        // Dual SIM -> Single SIM switch.
        for (int phoneId = oldActiveModemCount - 1; phoneId >= mActiveModemCount; phoneId--) {
            mCurrentDdsSwitchFailure.remove(phoneId);
        }

        // Single SIM -> Dual SIM switch.
        for (int phoneId = oldActiveModemCount; phoneId < mActiveModemCount; phoneId++) {
            mPhoneStates[phoneId] = new PhoneState();
            Phone phone = PhoneFactory.getPhone(phoneId);