Revert "Use system/audio to/from string converters in TypeConverter"
Revert "audio: Align lists of enum values between framework and HAL"
Revert submission 12851233-hal-enum-strings
Reason for revert: breaks slider device
Reverted Changes:
I4f64a8b61:Use system/audio to/from string converters in Type...
Iddaa92bf2:Move enums shared with HAL to audio-hal-enums.h
Ie5896775b:audio: Align lists of enum values between framewor...
Bug: 171262726
Change-Id: I7568c41c5641cf120ffacbfda4751c3bb1c4e4f8
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 1084bdf..d9a5fa2 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -5638,8 +5638,8 @@
}
DeviceVector activeDevices;
DeviceVector devices;
- for (int i = AUDIO_STREAM_MIN; i < AUDIO_STREAM_PUBLIC_CNT; ++i) {
- const audio_stream_type_t curStream{static_cast<audio_stream_type_t>(i)};
+ for (audio_stream_type_t curStream = AUDIO_STREAM_MIN; curStream < AUDIO_STREAM_PUBLIC_CNT;
+ curStream = (audio_stream_type_t) (curStream + 1)) {
if (!streamsMatchForvolume(stream, curStream)) {
continue;
}