Correct DND audio focus issue related to VoIP calls.

The `IncomingCallFilterGraph` includes the `DndFilter` which is used to
compute `AudioManager#matchesCallFilter`.  The existing behavior is to
use the output of this to set `Call#setCallIsSuppressedByDoNotDisturb`.
When the call filtering graph is bypassed, as it is for VoIP calls, we
end up setting `setCallIsSuppressedByDoNotDisturb` to `false`, which
means that we will always get audio focus for the call.

To fix this changed the `CallFilteringResult` so that the DND suppression
status can be either "not determined", "suppressed" or "not suppressed".
By default it will be "not determined".  This way when we skip the the
call filtering graph and use the default filtering result, it will be
"not determined".  As a result, `Ringer` will no longer see that the
DND suppression status is "false" in this case.

The next problem we had was in Ringer.java itself.  The logic to determine
if `shouldAcquireAudioFocus` ALWAYS returned true for Voip.  Realistically
VoIP should take into account DND and zero volume for the ringer as well.
The comments tell the story if you want to know more.

Test: Added CallFilteringResultTest to test behavior of the tri-state
dnd status as combined in call filtering results.
Test: Updated RingerTest to verify behavior when no DND filter computation
took place.
Test: Added new CTS CUJ tests for these scenarios
Fixes: 415288638
Flag: com.android.server.telecom.flags.voip_dnd_focus
Change-Id: I8a8c8552a1a4787ded1ab744df8093cd00efe0b5

Change-Id: Ide76caa2cd2b1f9f90e4b13856bfa5b5d4d46558

11 files changed