summaryrefslogtreecommitdiff
path: root/services/incremental/IncrementalService.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/incremental/IncrementalService.cpp')
-rw-r--r--services/incremental/IncrementalService.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp
index 2c6bf0a80fe0..695b68bf71cb 100644
--- a/services/incremental/IncrementalService.cpp
+++ b/services/incremental/IncrementalService.cpp
@@ -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())) {