Add instance creation to composd.
At startup we validate the files needed for the current instance exist
and are valid; if anything goes wrong we re-create them.
Bug: 186126194
Test: Manual, via composd_cmd.
Change-Id: Iaf19a74df14a91436c4cb4435f0286fa09307db8
diff --git a/compos/composd/src/service.rs b/compos/composd/src/service.rs
index e3a1be0..fadca6c 100644
--- a/compos/composd/src/service.rs
+++ b/compos/composd/src/service.rs
@@ -30,13 +30,12 @@
use log::{error, info};
use std::ffi::CString;
-#[derive(Default)]
pub struct IsolatedCompilationService {
instance_manager: InstanceManager,
}
-pub fn new_binder() -> Strong<dyn IIsolatedCompilationService> {
- let service = IsolatedCompilationService::default();
+pub fn new_binder(instance_manager: InstanceManager) -> Strong<dyn IIsolatedCompilationService> {
+ let service = IsolatedCompilationService { instance_manager };
BnIsolatedCompilationService::new_binder(service, BinderFeatures::default())
}