Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c84d9d23 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh
Browse files

Include AudioPolicyInterface.h only when needed.

Both legacy and non-legacy AudioPolicyInterface define
extern "C" functions createAudioPloicyManager and
destroyAudioPloicyManager. Standard C++ does not
allow overloading of extern C functions.
g++ did not catch this problem but clang++ does.

Change-Id: I80869cdb26e7721777e53d4eff71c5c733044abf
parent a82b5f57
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
#include <hardware_legacy/power.h>
#include <media/AudioEffect.h>
#include <media/EffectsFactoryApi.h>
#include <media/AudioParameter.h>

#include <hardware/hardware.h>
#include <system/audio.h>
+2 −0
Original line number Diff line number Diff line
@@ -30,7 +30,9 @@
#include <media/IAudioPolicyService.h>
#include <media/ToneGenerator.h>
#include <media/AudioEffect.h>
#ifdef USE_LEGACY_AUDIO_POLICY
#include <hardware_legacy/AudioPolicyInterface.h>
#endif
#include "AudioPolicyEffects.h"
#include "AudioPolicyManager.h"