Merge "Reconnect to DataLoaders on restart." into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
83e0ddc69b
@@ -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)]() {
|
std::thread([this, mounts = std::move(mounts)]() {
|
||||||
|
mJni->initializeForCurrentThread();
|
||||||
for (auto&& ifs : mounts) {
|
for (auto&& ifs : mounts) {
|
||||||
if (prepareDataLoader(*ifs)) {
|
if (ifs->dataLoaderStub->create()) {
|
||||||
LOG(INFO) << "Successfully started data loader for mount " << ifs->mountId;
|
LOG(INFO) << "Successfully started data loader for mount " << ifs->mountId;
|
||||||
} else {
|
} else {
|
||||||
// TODO(b/133435829): handle data loader start failures
|
// TODO(b/133435829): handle data loader start failures
|
||||||
@@ -364,7 +368,6 @@ void IncrementalService::onSystemReady() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).detach();
|
}).detach();
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto IncrementalService::getStorageSlotLocked() -> MountMap::iterator {
|
auto IncrementalService::getStorageSlotLocked() -> MountMap::iterator {
|
||||||
@@ -1068,6 +1071,9 @@ bool IncrementalService::mountExistingImage(std::string_view root) {
|
|||||||
dataLoaderParams.arguments = loader.arguments();
|
dataLoaderParams.arguments = loader.arguments();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prepareDataLoader(*ifs, std::move(dataLoaderParams), nullptr);
|
||||||
|
CHECK(ifs->dataLoaderStub);
|
||||||
|
|
||||||
std::vector<std::pair<std::string, metadata::BindPoint>> bindPoints;
|
std::vector<std::pair<std::string, metadata::BindPoint>> bindPoints;
|
||||||
auto d = openDir(path::c_str(mountTarget));
|
auto d = openDir(path::c_str(mountTarget));
|
||||||
while (auto e = ::readdir(d.get())) {
|
while (auto e = ::readdir(d.get())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user