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

Commit 95b14ec4 authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Automerger Merge Worker
Browse files

Merge "Reconnect to DataLoaders on restart." into rvc-dev am: 83e0ddc6

Change-Id: I2c01214715795f590c1c1d21204d79137bae8e0c
parents 1c233bcc 83e0ddc6
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -353,10 +353,14 @@ void IncrementalService::onSystemReady() {
        }
    }

    /* TODO(b/151241369): restore data loaders on reboot.
    if (mounts.empty()) {
        return;
    }

    std::thread([this, mounts = std::move(mounts)]() {
        mJni->initializeForCurrentThread();
        for (auto&& ifs : mounts) {
            if (prepareDataLoader(*ifs)) {
            if (ifs->dataLoaderStub->create()) {
                LOG(INFO) << "Successfully started data loader for mount " << ifs->mountId;
            } else {
                // TODO(b/133435829): handle data loader start failures
@@ -364,7 +368,6 @@ void IncrementalService::onSystemReady() {
            }
        }
    }).detach();
    */
}

auto IncrementalService::getStorageSlotLocked() -> MountMap::iterator {
@@ -1068,6 +1071,9 @@ bool IncrementalService::mountExistingImage(std::string_view root) {
        dataLoaderParams.arguments = loader.arguments();
    }

    prepareDataLoader(*ifs, std::move(dataLoaderParams), nullptr);
    CHECK(ifs->dataLoaderStub);

    std::vector<std::pair<std::string, metadata::BindPoint>> bindPoints;
    auto d = openDir(path::c_str(mountTarget));
    while (auto e = ::readdir(d.get())) {