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

Commit 02007a00 authored by radhika's avatar radhika Committed by Automerger Merge Worker
Browse files

Log missed call when incoming call is received during outgoing call am: 12612778 am: dc79300a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/12958960

Change-Id: Ibfff6eceb114f54bd113a2ccde38ffe4cf2277ce
parents e56ba43f dc79300a
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -28,6 +28,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;

@@ -2083,7 +2084,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();