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

Commit f259465f authored by Suresh Koleti's avatar Suresh Koleti
Browse files

Dial emergency call just after APM OFF

- Currently waiting for voice registration state to
  redial emergency call after airplane mode is disabled.
- Redial emergency call just after airplane mode is OFF.

Bug:145788899
Change-Id: I9cf1eb1b5554bfe0e90f129d1bc9870649aa61f9
parent 4a2167e6
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -2451,8 +2451,8 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
            if (reasonInfo.getCode() == ImsReasonInfo.CODE_SIP_ALTERNATE_EMERGENCY_CALL
                    && mAutoRetryFailedWifiEmergencyCall) {
                Pair<ImsCall, ImsReasonInfo> callInfo = new Pair<>(imsCall, reasonInfo);
                mPhone.getDefaultPhone().getServiceStateTracker().registerForNetworkAttached(
                        ImsPhoneCallTracker.this, EVENT_REDIAL_WIFI_E911_CALL, callInfo);
                mPhone.getDefaultPhone().mCi.registerForOn(ImsPhoneCallTracker.this,
                        EVENT_REDIAL_WIFI_E911_CALL, callInfo);
                sendMessageDelayed(obtainMessage(EVENT_REDIAL_WIFI_E911_TIMEOUT, callInfo),
                        TIMEOUT_REDIAL_WIFI_E911_MS);
                final ConnectivityManager mgr = (ConnectivityManager) mPhone.getContext()
@@ -3488,8 +3488,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
                Pair<ImsCall, ImsReasonInfo> callInfo =
                        (Pair<ImsCall, ImsReasonInfo>) ((AsyncResult) msg.obj).userObj;
                removeMessages(EVENT_REDIAL_WIFI_E911_TIMEOUT);
                mPhone.getDefaultPhone().getServiceStateTracker()
                        .unregisterForNetworkAttached(this);
                mPhone.getDefaultPhone().mCi.unregisterForOn(this);
                ImsPhoneConnection oldConnection = findConnection(callInfo.first);
                if (oldConnection == null) {
                    sendCallStartFailedDisconnect(callInfo.first, callInfo.second);
@@ -3508,8 +3507,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
            }
            case EVENT_REDIAL_WIFI_E911_TIMEOUT: {
                Pair<ImsCall, ImsReasonInfo> callInfo = (Pair<ImsCall, ImsReasonInfo>) msg.obj;
                mPhone.getDefaultPhone().getServiceStateTracker()
                        .unregisterForNetworkAttached(this);
                mPhone.getDefaultPhone().mCi.unregisterForOn(this);
                removeMessages(EVENT_REDIAL_WIFI_E911_CALL);
                sendCallStartFailedDisconnect(callInfo.first, callInfo.second);
                break;