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

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

Merge "libaudiohal: Use 'exit' in HalDeathHandler instead of fatal log"

parents fec90a73 7f16ea4d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -48,12 +48,13 @@ void HalDeathHandler::unregisterAtExitHandler(void* cookie) {

void HalDeathHandler::serviceDied(uint64_t /*cookie*/, const wp<IBase>& /*who*/) {
    // No matter which of the service objects has died,
    // we need to run all the registered handlers and crash our process.
    // we need to run all the registered handlers and exit.
    std::lock_guard<std::mutex> guard(mHandlersLock);
    for (const auto& handler : mHandlers) {
        handler.second();
    }
    LOG_ALWAYS_FATAL("HAL server crashed, need to restart");
    ALOGE("HAL server crashed, audio server is restarting");
    exit(1);
}

} // namespace android