Implement use of Device.setConnectedState/_7_1 HAL method

Add 'Device.setConnectedState' to libaudiohal. It tries
to use Device.setConnectedState_7_1 when supported, or
fallbacks to Device.setConnectedState.

Remove direct use of setParameters from the framework
code. Add required plumbing between APM and AF.

Bug: 211601178
Test: on the device, check that HAL still receives the update
Change-Id: Ic9ac6fbea6ceea7db504d9c962392d90e21f57cb
(cherry picked from commit 516d398b4432022b1d39c8b32df25a6b894c010a)
Merged-In: Ic9ac6fbea6ceea7db504d9c962392d90e21f57cb
diff --git a/services/audiopolicy/AudioPolicyInterface.h b/services/audiopolicy/AudioPolicyInterface.h
index 602671e..ca6ba1e 100644
--- a/services/audiopolicy/AudioPolicyInterface.h
+++ b/services/audiopolicy/AudioPolicyInterface.h
@@ -459,6 +459,8 @@
 
     virtual status_t updateSecondaryOutputs(
             const TrackSecondaryOutputsMap& trackSecondaryOutputs) = 0;
+
+    virtual status_t setDeviceConnectedState(const struct audio_port_v7 *port, bool connected) = 0;
 };
 
     // These are the signatures of createAudioPolicyManager/destroyAudioPolicyManager