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

Commit 3cf55ef0 authored by Yifan Hong's avatar Yifan Hong
Browse files

do not getTransport before getting IHealth service.

getService already has getTransport logic.

Test: storaged unit tests

Bug: 63702641
Change-Id: I29be15e5713ac276fbbeda88224d8aef514319c6
parent f1b9b7e9
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -71,10 +71,6 @@ using android::hidl::manager::V1_0::IServiceManager;

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;