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

Commit 17cef1fe authored by quic_pengfeix's avatar quic_pengfeix Committed by Pengfei Xiao
Browse files

IMS: Set emergency call extra for network identified emergency call

Set the emergency call extra to true into call profile when the call
is network identified emergency call.

Bug:77565333
Change-Id: I0a1b67cc930477422e7d7101347446f7aa0fb19e
parent f2311c7e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -3471,6 +3471,15 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
                    Connection newConnection =
                            mPhone.getDefaultPhone().dial(mLastDialString, mLastDialArgs);
                    oldConnection.onOriginalConnectionReplaced(newConnection);

                    final ImsCall imsCall = mForegroundCall.getImsCall();
                    final ImsCallProfile callProfile = imsCall.getCallProfile();
                    /* update EXTRA_EMERGENCY_CALL for clients to infer
                       from this extra that the call is emergency call */
                    callProfile.setCallExtraBoolean(
                            ImsCallProfile.EXTRA_EMERGENCY_CALL, true);
                    ImsPhoneConnection conn = findConnection(imsCall);
                    conn.updateExtras(imsCall);
                } catch (CallStateException e) {
                    sendCallStartFailedDisconnect(callInfo.first, callInfo.second);
                }