Remove usage of getStatus.

- remove from libaudiohal
- remove from services/radio
- remove from soundtrigger
- remove from omx

Bug: 31348667
Test: compiles
Change-Id: I75bb7b7388527dacfdc5bf128712cb8690bc286b
diff --git a/services/radio/RadioHalHidl.cpp b/services/radio/RadioHalHidl.cpp
index 182880a..34a6db7 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__);
@@ -52,7 +47,7 @@
         return -ENODEV;
     }
     Properties halProperties;
-    Result halResult;
+    Result halResult = Result::NOT_INITIALIZED;
     Return<void> hidlReturn =
             module->getProperties([&](Result result, const Properties& properties) {
                     halResult = result;
@@ -61,7 +56,6 @@
                     }
                 });
 
-    crashIfHalIsDead(hidlReturn.getStatus());
     if (halResult == Result::OK) {
         HidlUtils::convertPropertiesFromHal(properties, &halProperties);
     }
@@ -80,7 +74,7 @@
     sp<Tuner> tunerImpl = new Tuner(callback, this);
 
     BandConfig halConfig;
-    Result halResult;
+    Result halResult = Result::NOT_INITIALIZED;
     sp<ITuner> halTuner;
 
     HidlUtils::convertBandConfigToHal(&halConfig, config);
@@ -93,7 +87,6 @@
                     }
                 });
 
-    crashIfHalIsDead(hidlReturn.getStatus());
     if (halResult == Result::OK) {
         tunerImpl->setHalTuner(halTuner);
         tuner = tunerImpl;
@@ -154,7 +147,6 @@
     HidlUtils::convertBandConfigToHal(&halConfig, config);
 
     Return<Result> hidlResult = mHalTuner->setConfiguration(halConfig);
-    checkHidlStatus(hidlResult.getStatus());
     return HidlUtils::convertHalResult(hidlResult);
 }
 
@@ -173,8 +165,7 @@
                         halConfig = config;
                     }
                 });
-    status_t status = checkHidlStatus(hidlReturn.getStatus());
-    if (status == NO_ERROR && halResult == Result::OK) {
+    if (hidlReturn.isOk() && halResult == Result::OK) {
         HidlUtils::convertBandConfigFromHal(config, &halConfig);
     }
     return HidlUtils::convertHalResult(halResult);
@@ -188,7 +179,6 @@
     }
     Return<Result> hidlResult =
             mHalTuner->scan(static_cast<Direction>(direction), skip_sub_channel);
-    checkHidlStatus(hidlResult.getStatus());
     return HidlUtils::convertHalResult(hidlResult);
 }
 
@@ -200,7 +190,6 @@
     }
     Return<Result> hidlResult =
             mHalTuner->step(static_cast<Direction>(direction), skip_sub_channel);
-    checkHidlStatus(hidlResult.getStatus());
     return HidlUtils::convertHalResult(hidlResult);
 }
 
@@ -212,7 +201,6 @@
     }
     Return<Result> hidlResult =
             mHalTuner->tune(channel, sub_channel);
-    checkHidlStatus(hidlResult.getStatus());
     return HidlUtils::convertHalResult(hidlResult);
 }
 
@@ -223,7 +211,6 @@
         return -ENODEV;
     }
     Return<Result> hidlResult = mHalTuner->cancel();
-    checkHidlStatus(hidlResult.getStatus());
     return HidlUtils::convertHalResult(hidlResult);
 }
 
@@ -245,8 +232,7 @@
                 halInfo = info;
             }
         });
-    status_t status = checkHidlStatus(hidlReturn.getStatus());
-    if (status == NO_ERROR && halResult == Result::OK) {
+    if (hidlReturn.isOk() && halResult == Result::OK) {
         HidlUtils::convertProgramInfoFromHal(info, &halInfo);
     }
     return HidlUtils::convertHalResult(halResult);
@@ -368,16 +354,6 @@
     mHalTuner.clear();
 }
 
-status_t RadioHalHidl::Tuner::checkHidlStatus(Status hidlStatus)
-{
-    status_t status = hidlStatus.transactionError();
-    if (status == DEAD_OBJECT) {
-        handleHwFailure();
-    }
-    RadioHalHidl::crashIfHalIsDead(hidlStatus);
-    return status;
-}
-
 void RadioHalHidl::Tuner::onCallback(radio_hal_event_t *halEvent)
 {
     if (mCallback != 0) {