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

Commit 18cea8df authored by Yi-Yo Chiang's avatar Yi-Yo Chiang Committed by Automerger Merge Worker
Browse files

Merge "remount: Replace ServiceManager::getService with checkService" into main am: 4131a3af

parents c7b9ece0 4131a3af
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -128,14 +128,13 @@ class MyLogger {
}

static android::sp<android::os::IVold> GetVold() {
    auto sm = android::defaultServiceManager();
    while (true) {
        if (auto sm = android::defaultServiceManager()) {
            if (auto binder = sm->getService(android::String16("vold"))) {
        if (auto binder = sm->checkService(android::String16("vold"))) {
            if (auto vold = android::interface_cast<android::os::IVold>(binder)) {
                return vold;
            }
        }
        }
        std::this_thread::sleep_for(2s);
    }
}