Format VTS test code
Bug: 287430121
Test: atest VtsHalAudioEffectTargetTest
Change-Id: Iecc0c9388c6596cf5a25918f8f0af0495b2133a6
diff --git a/audio/aidl/vts/EffectHelper.h b/audio/aidl/vts/EffectHelper.h
index a1353f5..685d07d 100644
--- a/audio/aidl/vts/EffectHelper.h
+++ b/audio/aidl/vts/EffectHelper.h
@@ -30,16 +30,15 @@
#include <android/binder_auto_utils.h>
#include <fmq/AidlMessageQueue.h>
#include <gtest/gtest.h>
+#include <system/audio_aidl_utils.h>
#include <system/audio_effects/aidl_effects_utils.h>
#include <system/audio_effects/effect_uuid.h>
-#include <system/audio_aidl_utils.h>
#include "AudioHalBinderServiceUtil.h"
#include "EffectFactoryHelper.h"
#include "TestUtils.h"
using namespace android;
-using ::android::audio::utils::toString;
using aidl::android::hardware::audio::effect::CommandId;
using aidl::android::hardware::audio::effect::Descriptor;
using aidl::android::hardware::audio::effect::IEffect;
@@ -53,6 +52,7 @@
using aidl::android::media::audio::common::AudioFormatType;
using aidl::android::media::audio::common::AudioUuid;
using aidl::android::media::audio::common::PcmType;
+using ::android::audio::utils::toString;
using ::android::hardware::EventFlag;
const AudioFormatDescription kDefaultFormatDescription = {
@@ -65,10 +65,9 @@
::aidl::android::hardware::common::fmq::SynchronizedReadWrite>
DataMQ;
-static inline std::string getPrefix(Descriptor &descriptor) {
+static inline std::string getPrefix(Descriptor& descriptor) {
std::string prefix = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- toString(descriptor.common.id.uuid);
+ descriptor.common.name + "_UUID_" + toString(descriptor.common.id.uuid);
return prefix;
}
diff --git a/audio/aidl/vts/VtsHalAECTargetTest.cpp b/audio/aidl/vts/VtsHalAECTargetTest.cpp
index 4f658f2..1a7c3d4 100644
--- a/audio/aidl/vts/VtsHalAECTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAECTargetTest.cpp
@@ -162,8 +162,8 @@
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
std::string echoDelay = std::to_string(std::get<PARAM_ECHO_DELAY>(info.param));
std::string mobileMode = std::get<PARAM_MOBILE_MODE>(info.param) ? "true" : "false";
- std::string name = getPrefix(descriptor) + "_EchoDelay_" + echoDelay +
- "_MobileMode_" + mobileMode;
+ std::string name =
+ getPrefix(descriptor) + "_EchoDelay_" + echoDelay + "_MobileMode_" + mobileMode;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalAGC1TargetTest.cpp b/audio/aidl/vts/VtsHalAGC1TargetTest.cpp
index cc00763..65c6a8f 100644
--- a/audio/aidl/vts/VtsHalAGC1TargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAGC1TargetTest.cpp
@@ -177,9 +177,9 @@
std::to_string(std::get<PARAM_MAX_COMPRESSION_GAIN>(info.param));
std::string enableLimiter = std::to_string(std::get<PARAM_ENABLE_LIMITER>(info.param));
- std::string name = getPrefix(descriptor) + "_target_peak_level_" +
- targetPeakLevel + "_max_compression_gain_" + maxCompressionGain +
- "_enable_limiter_" + enableLimiter;
+ std::string name = getPrefix(descriptor) + "_target_peak_level_" + targetPeakLevel +
+ "_max_compression_gain_" + maxCompressionGain + "_enable_limiter_" +
+ enableLimiter;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp b/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp
index d417e86..54caed9 100644
--- a/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp
@@ -195,10 +195,10 @@
std::to_string(std::get<PARAM_VIBRATION_INFORMATION_Q_FACTOR>(info.param));
std::string maxAmplitude =
std::to_string(std::get<PARAM_VIBRATION_INFORMATION_MAX_AMPLITUDE>(info.param));
- std::string name = getPrefix(descriptor) + "_hapticScaleId" +
- hapticScaleID + "_hapticScaleVibScale" + hapticScaleVibScale +
- "_resonantFrequency" + resonantFrequency + "_qFactor" + qFactor +
- "_maxAmplitude" + maxAmplitude;
+ std::string name = getPrefix(descriptor) + "_hapticScaleId" + hapticScaleID +
+ "_hapticScaleVibScale" + hapticScaleVibScale + "_resonantFrequency" +
+ resonantFrequency + "_qFactor" + qFactor + "_maxAmplitude" +
+ maxAmplitude;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalNSTargetTest.cpp b/audio/aidl/vts/VtsHalNSTargetTest.cpp
index 7c8b2e5..bbb11fc 100644
--- a/audio/aidl/vts/VtsHalNSTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalNSTargetTest.cpp
@@ -155,8 +155,7 @@
std::get<PARAM_LEVEL>(info.param));
std::string type = aidl::android::hardware::audio::effect::toString(
std::get<PARAM_TYPE>(info.param));
- std::string name = getPrefix(descriptor) + "_level_" + level + "_type_" +
- type;
+ std::string name = getPrefix(descriptor) + "_level_" + level + "_type_" + type;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
index 9193a36..0b5b9fc 100644
--- a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
@@ -149,8 +149,7 @@
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
std::string level = std::to_string(std::get<PARAM_LEVEL>(info.param));
std::string mute = std::to_string(std::get<PARAM_MUTE>(info.param));
- std::string name = getPrefix(descriptor) + "_level" + level + "_mute" +
- mute;
+ std::string name = getPrefix(descriptor) + "_level" + level + "_mute" + mute;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;