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

Commit 12612778 authored by radhika's avatar radhika
Browse files

Log missed call when incoming call is received during outgoing call

setup
Bug: b/171255813
Test: Originate a call, before call is accepted, receive an incoming
call
Ensure incomming call is logged as a missed call

Change-Id: Ifcae2741fdfc86c9ef2ccfe8a32778bf126f0ac8
parent c9c28a82
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.telephony.PhoneNumberUtils;
import android.telephony.PhoneStateListener;
import android.telephony.ServiceState;

import com.android.internal.telephony.imsphone.ImsPhoneConnection;
import com.android.internal.telephony.sip.SipPhone;
import com.android.telephony.Rlog;

@@ -2087,7 +2088,13 @@ public class CallManager {
                    if (VDBG) Rlog.d(LOG_TAG, " handleMessage (EVENT_NEW_RINGING_CONNECTION)");
                    Connection c = (Connection) ((AsyncResult) msg.obj).result;
                    int subId = c.getCall().getPhone().getSubId();
                    if (getActiveFgCallState(subId).isDialing() || hasMoreThanOneRingingCall()) {
                    boolean incomingRejected = false;
                    if ((c.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS)
                            && ((ImsPhoneConnection) c).isIncomingCallAutoRejected()) {
                        incomingRejected = true;
                    }
                    if ((getActiveFgCallState(subId).isDialing() || hasMoreThanOneRingingCall())
                            && (!incomingRejected)) {
                        try {
                            Rlog.d(LOG_TAG, "silently drop incoming call: " + c.getCall());
                            c.getCall().hangup();