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

Commit c2656e8c authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

audiohal: Wait for IAllocator to become available

IAllocator is a framework service, and currently dependency on it
isn't handled correctly.

Bug: 34771147
Change-Id: Id3d50dd3bf9456aa363ae20a30ad319cf9c72e10
Test: manual
parent 24a8da67
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -17,7 +17,9 @@
#define LOG_TAG "EffectsFactoryHalHidl"
//#define LOG_NDEBUG 0

#include <android/hidl/memory/1.0/IAllocator.h>
#include <cutils/native_handle.h>
#include <hidl/ServiceManagement.h>
#include <media/EffectsFactoryApi.h>

#include "ConversionHelperHidl.h"
@@ -45,6 +47,10 @@ bool EffectsFactoryHalInterface::isNullUuid(const effect_uuid_t *pEffectUuid) {

EffectsFactoryHalHidl::EffectsFactoryHalHidl() : ConversionHelperHidl("EffectsFactory"){
    mEffectsFactory = IEffectsFactory::getService("audio_effects_factory");
    // TODO: Waiting should not be needed (b/34772726).
    // Also remove include of IAllocator.h and ServiceManagement.h
    android::hardware::details::waitForHwService(
            hidl::memory::V1_0::IAllocator::descriptor, "ashmem");
}

EffectsFactoryHalHidl::~EffectsFactoryHalHidl() {