CarAudioFocus: Fix requesting AF from a client that already holds it.

Previously, when a client that already held audio focus requested audio
focus again, so long as the usages (stream) was the same, their request
was treated as a duplicate, and trivially approved. However, if the
request was for the same usages, but a different audio focus type (for
instance, if a client held GAIN_TRANSIENT_MAY_DUCK, and wanted to convert
that focus to permanent GAIN), that request would be approved without
adjusting the focus held by other listeners. This could result in multiple
clients each thinking they had audio focus, which could lead to clashing
audio.

This change fixes the issue by always treating a duplicate request as a
new request for audio focus, replacing the previous request. The new
request goes through the full interaction matrix, except for the request
which it is replacing.

Additionally, this change updates KitchenSink to use the new O+
AudioFocusRequest APIs, and allows making more types of of audio focus
request for easier testing.

Bug: 128701073
Test: Flashed onto Hawk, made AF requests with KitchenSink
Change-Id: I2d9b98b2e3bb50caea1511d16dab5110a822ee5b
4 files changed