Revert "Crash audioserver if EPIPE (DEAD_OBJECT) is received from the HAL"
This reverts commit 9f55e5f998644d58cb8f3625e06d9b7a4e78555c.
Change-Id: Ic76c0cb5032af422699da2b43106b4b1de5ac935
diff --git a/services/radio/RadioHalHidl.cpp b/services/radio/RadioHalHidl.cpp
index 5eb37bd..07cb4d5 100644
--- a/services/radio/RadioHalHidl.cpp
+++ b/services/radio/RadioHalHidl.cpp
@@ -39,11 +39,6 @@
return new RadioHalHidl(classId);
}
-void RadioHalHidl::crashIfHalIsDead(const Status& status) {
- LOG_ALWAYS_FATAL_IF(
- status.transactionError() == DEAD_OBJECT, "HAL server crashed, need to restart");
-}
-
int RadioHalHidl::getProperties(radio_hal_properties_t *properties)
{
ALOGV("%s IN", __FUNCTION__);
@@ -61,7 +56,10 @@
}
});
- crashIfHalIsDead(hidlReturn.getStatus());
+ if (hidlReturn.getStatus().transactionError() == DEAD_OBJECT) {
+ clearService();
+ return -EPIPE;
+ }
if (halResult == Result::OK) {
HidlUtils::convertPropertiesFromHal(properties, &halProperties);
}
@@ -93,7 +91,10 @@
}
});
- crashIfHalIsDead(hidlReturn.getStatus());
+ if (hidlReturn.getStatus().transactionError() == DEAD_OBJECT) {
+ clearService();
+ return -EPIPE;
+ }
if (halResult == Result::OK) {
tunerImpl->setHalTuner(halTuner);
tuner = tunerImpl;
@@ -374,7 +375,6 @@
if (status == DEAD_OBJECT) {
handleHwFailure();
}
- RadioHalHidl::crashIfHalIsDead(status);
return status;
}