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

Commit 3bf22289 authored by Srikanth Chintala's avatar Srikanth Chintala Committed by Hall Liu
Browse files

Handling call with handle null or number empty

in DirectToVoicemailCallFilter

Handling call handle null or number in the handle
is empty by updating the DirectToVoicemailCallFilter
with the onCallerInfoQueryComplete callback to avoid
IncomingCallFilter to wait till timeout.

Bug: 65390135
Change-Id: Ifecc2aabe1cba901e7604411980a98b2cdbeed3f
parent dd6a7b31
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2122,7 +2122,7 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable {
            return;
        }

        if (!handle.equals(mHandle)) {
        if ((handle != null) && !handle.equals(mHandle)) {
            Log.i(this, "setCallerInfo received stale caller info for an old handle. Ignoring.");
            return;
        }
+9 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ public class DirectToVoicemailCallFilter implements IncomingCallFilter.CallFilte
                    @Override
                    public void onCallerInfoQueryComplete(Uri handle, CallerInfo info) {
                        CallFilteringResult result;
                        if (Objects.equals(callHandle, handle)) {
                        if ((handle != null) && Objects.equals(callHandle, handle)) {
                            if (info != null && info.shouldSendToVoicemail) {
                                result = new CallFilteringResult(
                                        false, // shouldAllowCall
@@ -62,8 +62,16 @@ public class DirectToVoicemailCallFilter implements IncomingCallFilter.CallFilte
                            Log.addEvent(call, LogUtils.Events.DIRECT_TO_VM_FINISHED, result);
                            callback.onCallFilteringComplete(call, result);
                        } else {
                            result = new CallFilteringResult(
                                true, // shouldAllowCall
                                false, // shouldReject
                                true, // shouldAddToCallLog
                                true // shouldShowNotification
                            );
                            Log.addEvent(call, LogUtils.Events.DIRECT_TO_VM_FINISHED, result);
                            Log.w(this, "CallerInfo lookup returned with a different handle than " +
                                    "what was passed in. Was %s, should be %s", handle, callHandle);
                            callback.onCallFilteringComplete(call, result);
                        }
                    }