Added IAudioControl#onDevicesToMuteChange
Added new API and parceable for informing the HAL when to mute and
unmute audio for automotive targets. Also added default implementation
to log information passed on.
Bug: 173141906
Test: atest VtsAidlHalAudioControlTest
Change-Id: I4c20320d33417616eef7a980a375ab9303b43eab
diff --git a/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp b/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp
index f23280d..ae53c68 100644
--- a/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp
+++ b/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp
@@ -33,6 +33,7 @@
using android::hardware::automotive::audiocontrol::BnFocusListener;
using android::hardware::automotive::audiocontrol::DuckingInfo;
using android::hardware::automotive::audiocontrol::IAudioControl;
+using android::hardware::automotive::audiocontrol::MutingInfo;
#include "android_audio_policy_configuration_V7_0.h"
@@ -130,6 +131,18 @@
audioControl->onAudioFocusChange(usage, 0, AudioFocusChange::GAIN_TRANSIENT).isOk());
};
+TEST_P(AudioControlAidl, MuteChangeExercise) {
+ ALOGI("Mute change test");
+
+ MutingInfo mutingInfo;
+ mutingInfo.zoneId = 0;
+ mutingInfo.deviceAddressesToMute = {String16("address 1"), String16("address 2")};
+ mutingInfo.deviceAddressesToUnmute = {String16("address 3"), String16("address 4")};
+ std::vector<MutingInfo> mutingInfos = {mutingInfo};
+ ALOGI("Mute change test start");
+ ASSERT_TRUE(audioControl->onDevicesToMuteChange(mutingInfos).isOk());
+}
+
TEST_P(AudioControlAidl, DuckChangeExercise) {
ALOGI("Duck change test");