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

Commit 216a4e21 authored by Alex Koskovich's avatar Alex Koskovich Committed by Michael Bestas
Browse files

Restore isEmergency method

Commit 319c9cc7 removed it but
QTI telephony still requires this method to be present.

Change-Id: Ic59332a3be0425a838332118b092fe0d984eabf2
parent 97f3b4e0
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -622,6 +622,19 @@ public class PhoneSwitcher extends Handler {
        }
        }
    }
    }


    protected boolean isEmergency() {
        if (isInEmergencyCallbackMode()) return true;
        for (Phone p : mPhones) {
            if (p == null) continue;
            if (p.isInEmergencyCall()) return true;
            Phone imsPhone = p.getImsPhone();
            if (imsPhone != null && imsPhone.isInEmergencyCall()) {
                return true;
            }
        }
        return false;
    }

    private boolean isInEmergencyCallbackMode() {
    private boolean isInEmergencyCallbackMode() {
        for (Phone p : mPhones) {
        for (Phone p : mPhones) {
            if (p == null) continue;
            if (p == null) continue;