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

Commit 2ea77b91 authored by Joe Kaushal's avatar Joe Kaushal Committed by android-build-merger
Browse files

Merge "Avoid setting preferred phone with no phones" am: a843d87e am: 71db1cdc

am: b2297f1a

Change-Id: I8cad0053bc085f1717ca74b8ce1f8be4fa0d865d
parents fcce3cc0 b2297f1a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1047,6 +1047,11 @@ public class PhoneSwitcher extends Handler {
    }

    private void transitionToEmergencyPhone() {
        if (mNumPhones <= 0) {
            log("No phones: unable to reset preferred phone for emergency");
            return;
        }

        if (mPreferredDataPhoneId != DEFAULT_EMERGENCY_PHONE_ID) {
            log("No active subscriptions: resetting preferred phone to 0 for emergency");
            mPreferredDataPhoneId = DEFAULT_EMERGENCY_PHONE_ID;