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

Commit a8a67ca1 authored by Yifan Hong's avatar Yifan Hong Committed by Android (Google) Code Review
Browse files

Merge "do not getTransport before getting IHealth service."

parents 4b7f0fdc 3cf55ef0
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;