VolumeShaper: Make initialization consistent
Fix uninitialized enum variables for default
constructed aidl structs.
Test: compiles
Bug: 184662274
Change-Id: I5535dd6ce0648b4e02f64ce2b9ba10900d1e4b72
diff --git a/aidl/android/media/InterpolatorConfig.aidl b/aidl/android/media/InterpolatorConfig.aidl
index ef7486e..49f90e8 100644
--- a/aidl/android/media/InterpolatorConfig.aidl
+++ b/aidl/android/media/InterpolatorConfig.aidl
@@ -22,7 +22,7 @@
* {@hide}
*/
parcelable InterpolatorConfig {
- InterpolatorType type;
+ InterpolatorType type = InterpolatorType.CUBIC;
/** For cubic interpolation, the boundary conditions in slope. */
float firstSlope;
float lastSlope;
diff --git a/aidl/android/media/VolumeShaperConfiguration.aidl b/aidl/android/media/VolumeShaperConfiguration.aidl
index 824c169..d6e6505 100644
--- a/aidl/android/media/VolumeShaperConfiguration.aidl
+++ b/aidl/android/media/VolumeShaperConfiguration.aidl
@@ -24,7 +24,7 @@
* {@hide}
*/
parcelable VolumeShaperConfiguration {
- VolumeShaperConfigurationType type;
+ VolumeShaperConfigurationType type = VolumeShaperConfigurationType.ID;
int id;
/** Bitmask, indexed by VolumeShaperConfigurationOptionFlag. */
int optionFlags;
diff --git a/include/media/Interpolator.h b/include/media/Interpolator.h
index 2004acb..71e7604 100644
--- a/include/media/Interpolator.h
+++ b/include/media/Interpolator.h
@@ -43,7 +43,7 @@
using InterpolatorType = media::InterpolatorType;
explicit Interpolator(
- InterpolatorType interpolatorType = InterpolatorType::LINEAR,
+ InterpolatorType interpolatorType = InterpolatorType::CUBIC,
bool cache = true)
: mCache(cache)
, mFirstSlope(0)