audiopolicy: fix AudioRecordingConfiguration callback

Suppress first callback sent by startInput() as the input device is not
yet set and it results in a spurious AudioRecordingConfiguration callback
sent by RecordingActivityMonitor with a null audio device.

Also fix a bug in getInputForAttr() where the wrong audio attributes
were stored in the RecordClientDescriptor resulting in a failure to
create the audio patch when DEFAULT audio source is used.

Bug: 129287962
Test: cts-tradefed run cts-dev -m CtsMediaTestCases -t android.media.cts.AudioRecordingConfigurationTest
Change-Id: Ia67abfa56ea653cf69e68bfabbb3d19a12adc310
2 files changed