Start to add a function to compile staged APEXes
Add a new method to IIsolatedCompilationService which will eventually
run compilation over staged APEXes. Currently it doesn't, but it is
slightly more realistic than the test compile (which I'm leaving in
place since it's useful for testing) - we use the pending instance of
compos (so odsign will attempt to verify the keys) and we run
odrefresh --compile instead of --force-compile. For now the artifacts
are still written to the test-artifacts directory so odsign doesn't
see them.
Bug: 205296305
Test: composd_cmd staged-apex-compile
Change-Id: If4d449878e38a97aa0f1f1dbb71c9df9b86ca4d5
diff --git a/compos/composd/src/instance_manager.rs b/compos/composd/src/instance_manager.rs
index 6291d59..767e9f7 100644
--- a/compos/composd/src/instance_manager.rs
+++ b/compos/composd/src/instance_manager.rs
@@ -23,7 +23,7 @@
use compos_aidl_interface::aidl::com::android::compos::ICompOsService::ICompOsService;
use compos_aidl_interface::binder::Strong;
use compos_common::compos_client::VmParameters;
-use compos_common::{CURRENT_INSTANCE_DIR, TEST_INSTANCE_DIR};
+use compos_common::{PENDING_INSTANCE_DIR, TEST_INSTANCE_DIR};
use std::sync::{Arc, Mutex, Weak};
use virtualizationservice::IVirtualizationService::IVirtualizationService;
@@ -43,9 +43,8 @@
Ok(instance.get_service())
}
- #[allow(dead_code)] // TODO: Make use of this
- pub fn start_current_instance(&self) -> Result<Arc<CompOsInstance>> {
- self.start_instance(CURRENT_INSTANCE_DIR, VmParameters::default())
+ pub fn start_pending_instance(&self) -> Result<Arc<CompOsInstance>> {
+ self.start_instance(PENDING_INSTANCE_DIR, VmParameters::default())
}
pub fn start_test_instance(&self) -> Result<Arc<CompOsInstance>> {