do not getTransport before getting IHealth service.
getService already has getTransport logic.
Test: storaged unit tests
Bug: 63702641
Change-Id: I29be15e5713ac276fbbeda88224d8aef514319c6
diff --git a/storaged/storaged.cpp b/storaged/storaged.cpp
index 39c347a..c94137c 100644
--- a/storaged/storaged.cpp
+++ b/storaged/storaged.cpp
@@ -71,10 +71,6 @@
static sp<IHealth> get_health_service() {
for (auto&& instanceName : {"default", "backup"}) {
- if (IServiceManager::getService()->getTransport(IHealth::descriptor, instanceName) ==
- IServiceManager::Transport::EMPTY) {
- continue;
- }
auto ret = IHealth::getService(instanceName);
if (ret != nullptr) {
return ret;