audio policy: improve input device connection logic

Do not systematically close all inputs when an input device is connected
or disconnected but only those affected by the change.

Also:
- refactor setDeviceConnectionStateInt() to align input and output
devices connection sequence
- remove unused "inputs" argument to checkInputsForDevice()

Bug: 126370328
Test: phone call, video call , camcorder, assistant, auto projected
Change-Id: I27734b32da97ad4790d6cd74eaaf866e414db211
2 files changed