Replace LOG_ALWAYS_FATAL with ALOGE + exit, so the process still
restarts, but without a crash. This avoids confusion in bug triaging
and also helps to eliminate noise in bug reports statistics.
Bug:
36424777
Change-Id: I623cbc6a5b0d3351f849810dd67708d421efd61a
Test: reproduced error condition, checked that audio server restarts
// 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);
}
}
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() {