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

Commit 132f8536 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "audiohal: Exit instead of crashing when HAL factory can't be obtained"

parents 972e79f5 1ba4041b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -45,7 +45,8 @@ DevicesFactoryHalHidl::DevicesFactoryHalHidl() {
        // and thus have the same lifespan.
        mDevicesFactory->linkToDeath(HalDeathHandler::getInstance(), 0 /*cookie*/);
    } else {
        LOG_ALWAYS_FATAL("Failed to obtain IDevicesFactory service");
        ALOGE("Failed to obtain IDevicesFactory service, terminating process.");
        exit(1);
    }
}

+4 −1
Original line number Diff line number Diff line
@@ -44,7 +44,10 @@ bool EffectsFactoryHalInterface::isNullUuid(const effect_uuid_t *pEffectUuid) {

EffectsFactoryHalHidl::EffectsFactoryHalHidl() : ConversionHelperHidl("EffectsFactory") {
    mEffectsFactory = IEffectsFactory::getService();
    LOG_ALWAYS_FATAL_IF(mEffectsFactory == 0, "Failed to obtain IEffectsFactory service");
    if (mEffectsFactory == 0) {
        ALOGE("Failed to obtain IEffectsFactory service, terminating process.");
        exit(1);
    }
}

EffectsFactoryHalHidl::~EffectsFactoryHalHidl() {