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

Commit cd57af52 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix UiccController crash due to inconsistent phone count" into main

parents 4eacec1c 5a3ba387
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1665,7 +1665,7 @@ public class UiccController extends Handler {
    }

    private boolean isValidPhoneIndex(int index) {
        return (index >= 0 && index < TelephonyManager.getDefault().getPhoneCount());
        return (index >= 0 && index < mTelephonyManager.getActiveModemCount());
    }

    private boolean isValidSlotIndex(int index) {
@@ -1673,7 +1673,7 @@ public class UiccController extends Handler {
    }

    private boolean isShuttingDown() {
        for (int i = 0; i < TelephonyManager.getDefault().getActiveModemCount(); i++) {
        for (int i = 0; i < mTelephonyManager.getActiveModemCount(); i++) {
            if (PhoneFactory.getPhone(i) != null &&
                    PhoneFactory.getPhone(i).isShuttingDown()) {
                return true;