Ignore deleted voicemail for notification

Some voicemail sources keep deleted voicemails in the database for a while. Before this CL if the voicemail is deleted through blocking it will still be returned with CallLogNotificationQueryHelper.getNewVoicemail(), and deleted again. The Deletion triggers a notification update, and the phone enters a loop. If there are other voicemails, the phone will alert every time.

In this CL, deleted voicemails are no longer returned with the new voicemail query. Also if All voicemails already has a notification, the user will not be alerted.

Bug: 70585368
Test: VisualVoicmailUpdateTaskTest, CallLogNotificationQueryHelperTest
PiperOrigin-RevId: 179575512
Change-Id: I352bbf7d0a9d5e2132b5f968e5b5776c9fd518c6
2 files changed