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

Commit da04130a authored by Srikanth Chintala's avatar Srikanth Chintala Committed by android-build-merger
Browse files

Handling call with handle null or number empty in DirectToVoicemailCallFilter...

Handling call with handle null or number empty in DirectToVoicemailCallFilter am: 3bf22289 am: fcb8c3c1
am: 58203690

Change-Id: I1e40f938aff02ef47120ae4816f3860113968f7f
parents cbba3c34 58203690
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2260,7 +2260,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);
                        }
                    }