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

Commit dff6ace4 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Fix emergency callback number not shown for incoming calls.

- Adding isInEcm() to Phone interface and PhoneProxy; this is already
present in PhoneBase.
- Required so that TelephonyConnections can query ECM state of the phone.

Bug: 18689292
Change-Id: Ibdf7b42d7cd95c96c11ff11840d5883ff587f5b0
parent d20afc9b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1986,4 +1986,11 @@ public interface Phone {
     * @return {@code true} if video calling is enabled, {@code false} otherwise.
     */
    public boolean isVideoEnabled();

    /**
     * @return {@code true} if we are in emergency call back mode. This is a period where the phone
     * should be using as little power as possible and be ready to receive an incoming call from the
     * emergency operator.
     */
    public boolean isInEcm();
}
+3 −3
Original line number Diff line number Diff line
@@ -1447,9 +1447,9 @@ public abstract class PhoneBase extends Handler implements Phone {
    }

    /**
     * @return true if we are in the emergency call back mode. This is a period where
     * the phone should be using as little power as possible and be ready to receive an
     * incoming call from the emergency operator.
     * @return {@code true} if we are in emergency call back mode. This is a period where the phone
     * should be using as little power as possible and be ready to receive an incoming call from the
     * emergency operator.
     */
    public boolean isInEcm() {
        return false;
+10 −0
Original line number Diff line number Diff line
@@ -1522,6 +1522,16 @@ public class PhoneProxy extends Handler implements Phone {
        return mActivePhone.isVideoEnabled();
    }

    /**
     * @return true if we are in the emergency call back mode. This is a period where
     * the phone should be using as little power as possible and be ready to receive an
     * incoming call from the emergency operator.
     */
    @Override
    public boolean isInEcm() {
        return mActivePhone.isInEcm();
    }

    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        try {
            ((PhoneBase)mActivePhone).dump(fd, pw, args);