Thanks for sharing, it is very interesting and smart workaround.
Actually I am not sure whether I understand correctly your question as well as your solution. In my knowledge (as I am also working on a project that is related to CallLog), the call log item of the CURRENT CALL is added by system only *after* the call has been ended. It is *not* created when the call receiver (at the other end) picks up the call. If you have 2 phones, you can see this easily by calling from one to another and check the call log. That is why, to delete a call log item (there are many apps that help to clear call logs to keep privacy), normally you have to *wait* few seconds after the call ends up (IDLE). I can be sure about it, as I spent several days to solve this: in the beginning I did not know, so we tried to clear the log item too fast - right after the call ends - so it failed, finally we have to pause the deleting process for few seconds, and it works.