From 6755d76d9d9ecaf2045ec8fd7c954571c5e75803 Mon Sep 17 00:00:00 2001 From: Shunkai Yao Date: Wed, 2 Nov 2022 00:21:02 +0000 Subject: [PATCH] Use final specifier for all effects implementation classes. Avoid inherit from effect implementation class, all implmentations should inherit EffectImpl directly. Bug: 255361653 Test: atest VtsHalAudioEffectTargetTest atest VtsHalAudioEffectFactoryTargetTest atest VtsHalEqualizerTargetTest Change-Id: I3c3bd990423be21f2c79f0e797d71b2d7f850dca --- audio/aidl/default/bassboost/BassBoostSw.h | 4 ++-- audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h | 4 ++-- audio/aidl/default/hapticGenerator/HapticGeneratorSw.h | 4 ++-- audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.h | 4 ++-- audio/aidl/default/reverb/ReverbSw.h | 4 ++-- audio/aidl/default/virtualizer/VirtualizerSw.h | 4 ++-- audio/aidl/default/visualizer/VisualizerSw.h | 4 ++-- audio/aidl/default/volume/VolumeSw.h | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/audio/aidl/default/bassboost/BassBoostSw.h b/audio/aidl/default/bassboost/BassBoostSw.h index b44e968197..fe9c640ff0 100644 --- a/audio/aidl/default/bassboost/BassBoostSw.h +++ b/audio/aidl/default/bassboost/BassBoostSw.h @@ -26,7 +26,7 @@ namespace aidl::android::hardware::audio::effect { -class BassBoostSwContext : public EffectContext { +class BassBoostSwContext final : public EffectContext { public: BassBoostSwContext(int statusDepth, const Parameter::Common& common) : EffectContext(statusDepth, common) { @@ -35,7 +35,7 @@ class BassBoostSwContext : public EffectContext { // TODO: add specific context here }; -class BassBoostSw : public EffectImpl { +class BassBoostSw final : public EffectImpl { public: BassBoostSw() { LOG(DEBUG) << __func__; } ~BassBoostSw() { diff --git a/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h b/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h index ef94e32b4b..fc26902a17 100644 --- a/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h +++ b/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h @@ -26,7 +26,7 @@ namespace aidl::android::hardware::audio::effect { -class DynamicsProcessingSwContext : public EffectContext { +class DynamicsProcessingSwContext final : public EffectContext { public: DynamicsProcessingSwContext(int statusDepth, const Parameter::Common& common) : EffectContext(statusDepth, common) { @@ -35,7 +35,7 @@ class DynamicsProcessingSwContext : public EffectContext { // TODO: add specific context here }; -class DynamicsProcessingSw : public EffectImpl { +class DynamicsProcessingSw final : public EffectImpl { public: DynamicsProcessingSw() { LOG(DEBUG) << __func__; } ~DynamicsProcessingSw() { diff --git a/audio/aidl/default/hapticGenerator/HapticGeneratorSw.h b/audio/aidl/default/hapticGenerator/HapticGeneratorSw.h index 95a8d99bbf..b5a5036a27 100644 --- a/audio/aidl/default/hapticGenerator/HapticGeneratorSw.h +++ b/audio/aidl/default/hapticGenerator/HapticGeneratorSw.h @@ -26,7 +26,7 @@ namespace aidl::android::hardware::audio::effect { -class HapticGeneratorSwContext : public EffectContext { +class HapticGeneratorSwContext final : public EffectContext { public: HapticGeneratorSwContext(int statusDepth, const Parameter::Common& common) : EffectContext(statusDepth, common) { @@ -35,7 +35,7 @@ class HapticGeneratorSwContext : public EffectContext { // TODO: add specific context here }; -class HapticGeneratorSw : public EffectImpl { +class HapticGeneratorSw final : public EffectImpl { public: HapticGeneratorSw() { LOG(DEBUG) << __func__; } ~HapticGeneratorSw() { diff --git a/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.h b/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.h index 7d4bb527fb..c0de9c12c9 100644 --- a/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.h +++ b/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.h @@ -26,7 +26,7 @@ namespace aidl::android::hardware::audio::effect { -class LoudnessEnhancerSwContext : public EffectContext { +class LoudnessEnhancerSwContext final : public EffectContext { public: LoudnessEnhancerSwContext(int statusDepth, const Parameter::Common& common) : EffectContext(statusDepth, common) { @@ -35,7 +35,7 @@ class LoudnessEnhancerSwContext : public EffectContext { // TODO: add specific context here }; -class LoudnessEnhancerSw : public EffectImpl { +class LoudnessEnhancerSw final : public EffectImpl { public: LoudnessEnhancerSw() { LOG(DEBUG) << __func__; } ~LoudnessEnhancerSw() { diff --git a/audio/aidl/default/reverb/ReverbSw.h b/audio/aidl/default/reverb/ReverbSw.h index 9457ab344d..e00956f7d0 100644 --- a/audio/aidl/default/reverb/ReverbSw.h +++ b/audio/aidl/default/reverb/ReverbSw.h @@ -26,7 +26,7 @@ namespace aidl::android::hardware::audio::effect { -class ReverbSwContext : public EffectContext { +class ReverbSwContext final : public EffectContext { public: ReverbSwContext(int statusDepth, const Parameter::Common& common) : EffectContext(statusDepth, common) { @@ -35,7 +35,7 @@ class ReverbSwContext : public EffectContext { // TODO: add specific context here }; -class ReverbSw : public EffectImpl { +class ReverbSw final : public EffectImpl { public: ReverbSw() { LOG(DEBUG) << __func__; } ~ReverbSw() { diff --git a/audio/aidl/default/virtualizer/VirtualizerSw.h b/audio/aidl/default/virtualizer/VirtualizerSw.h index 86f442d657..da1998b89a 100644 --- a/audio/aidl/default/virtualizer/VirtualizerSw.h +++ b/audio/aidl/default/virtualizer/VirtualizerSw.h @@ -26,7 +26,7 @@ namespace aidl::android::hardware::audio::effect { -class VirtualizerSwContext : public EffectContext { +class VirtualizerSwContext final : public EffectContext { public: VirtualizerSwContext(int statusDepth, const Parameter::Common& common) : EffectContext(statusDepth, common) { @@ -35,7 +35,7 @@ class VirtualizerSwContext : public EffectContext { // TODO: add specific context here }; -class VirtualizerSw : public EffectImpl { +class VirtualizerSw final : public EffectImpl { public: VirtualizerSw() { LOG(DEBUG) << __func__; } ~VirtualizerSw() { diff --git a/audio/aidl/default/visualizer/VisualizerSw.h b/audio/aidl/default/visualizer/VisualizerSw.h index e9baece2c6..21101ddeb0 100644 --- a/audio/aidl/default/visualizer/VisualizerSw.h +++ b/audio/aidl/default/visualizer/VisualizerSw.h @@ -26,7 +26,7 @@ namespace aidl::android::hardware::audio::effect { -class VisualizerSwContext : public EffectContext { +class VisualizerSwContext final : public EffectContext { public: VisualizerSwContext(int statusDepth, const Parameter::Common& common) : EffectContext(statusDepth, common) { @@ -35,7 +35,7 @@ class VisualizerSwContext : public EffectContext { // TODO: add specific context here }; -class VisualizerSw : public EffectImpl { +class VisualizerSw final : public EffectImpl { public: VisualizerSw() { LOG(DEBUG) << __func__; } ~VisualizerSw() { diff --git a/audio/aidl/default/volume/VolumeSw.h b/audio/aidl/default/volume/VolumeSw.h index b0d2aa7306..e46c8645bf 100644 --- a/audio/aidl/default/volume/VolumeSw.h +++ b/audio/aidl/default/volume/VolumeSw.h @@ -26,7 +26,7 @@ namespace aidl::android::hardware::audio::effect { -class VolumeSwContext : public EffectContext { +class VolumeSwContext final : public EffectContext { public: VolumeSwContext(int statusDepth, const Parameter::Common& common) : EffectContext(statusDepth, common) { @@ -35,7 +35,7 @@ class VolumeSwContext : public EffectContext { // TODO: add specific context here }; -class VolumeSw : public EffectImpl { +class VolumeSw final : public EffectImpl { public: VolumeSw() { LOG(DEBUG) << __func__; } ~VolumeSw() {