Merge "set-verity-state: Start a threadpool to service waitForService() CB"

This commit is contained in:
Yi-yo Chiang 2022-08-11 06:00:30 +00:00 committed by Gerrit Code Review
commit e761510df0
2 changed files with 6 additions and 0 deletions

View File

@ -9,9 +9,11 @@ cc_binary {
srcs: ["set-verity-state.cpp"],
shared_libs: [
"libbase",
"libbinder",
"libcrypto",
"libcrypto_utils",
"libfs_mgr_binder",
"libutils",
],
static_libs: [
"libavb_user",

View File

@ -19,6 +19,7 @@
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <binder/ProcessState.h>
#include <fs_mgr_overlayfs.h>
#include <libavb_user/libavb_user.h>
@ -153,6 +154,9 @@ int main(int argc, char* argv[]) {
return 1;
}
// Start a threadpool to service waitForService() callbacks as
// fs_mgr_overlayfs_* might call waitForService() to get the image service.
android::ProcessState::self()->startThreadPool();
bool any_changed = set_avb_verity_enabled_state(ops.get(), enable);
any_changed |= overlayfs_setup(enable);