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

Commit d913f668 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Do not set the state to POWER_OFF when in APM for ImsPhone

There is no need to set the ImsPhone to the state POWER_OFF
when we move into APM, since there is no difference between that
and the OUT_OF_SERVICE state.

Also, removes the POWER_OFF check from the ImsPhoneCallTracker,
as it should only determine whether or not it can dial a call
from the ImsService capabilities at the time of the call.

Bug:62816248
Test: Manual, Test E911 call
Change-Id: I904be6a8e79d40ebf8f8dae81277169ad7dabfcc
parent 17a99fb6
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -2095,10 +2095,6 @@ public class GsmCdmaPhone extends Phone {
                }
            }
        }
        Phone imsPhone = mImsPhone;
        if (imsPhone != null) {
            imsPhone.getServiceState().setStateOff();
        }
        mRadioOffOrNotAvailableRegistrants.notifyRegistrants();
    }

+6 −9
Original line number Diff line number Diff line
@@ -1287,15 +1287,12 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
            && !mForegroundCall.isFull();
    }

    public boolean
    canDial() {
    public boolean canDial() {
        boolean ret;
        int serviceState = mPhone.getServiceState().getState();
        String disableCall = SystemProperties.get(
                TelephonyProperties.PROPERTY_DISABLE_CALL, "false");

        ret = (serviceState != ServiceState.STATE_POWER_OFF)
            && mPendingMO == null
        ret = mPendingMO == null
                && !mRingingCall.isRinging()
                && !disableCall.equals("true")
                && (!mForegroundCall.getState().isAlive()