Initiailize assumed BOOTCLASSPATH and DEX2OATBOOTCLASSPATH
This change simply tells the VM to use Android's BOTTCLASSPATH and
DEX2OATBOOTCLASSPATH. This won't work with staged APEXes, and we need to
fix how the initialization is done.
For now, having these environment variables set unblock a few changes.
Bug: 198211396
Test: With local changes that fail without these env variables,
ComposHostTestCases passed with this change.
Change-Id: If4ccb9fb2dbea0658b6667878c848bb51df43cde
diff --git a/compos/src/compsvc.rs b/compos/src/compsvc.rs
index 08f3521..2a5534c 100644
--- a/compos/src/compsvc.rs
+++ b/compos/src/compsvc.rs
@@ -22,6 +22,7 @@
use binder_common::new_binder_exception;
use log::warn;
use std::default::Default;
+use std::env;
use std::path::PathBuf;
use std::sync::{Arc, RwLock};
@@ -85,6 +86,17 @@
}
}
+ fn initializeClasspaths(
+ &self,
+ boot_classpath: &str,
+ dex2oat_boot_classpath: &str,
+ ) -> BinderResult<()> {
+ // TODO(198211396): Implement correctly.
+ env::set_var("BOOTCLASSPATH", boot_classpath);
+ env::set_var("DEX2OATBOOTCLASSPATH", dex2oat_boot_classpath);
+ Ok(())
+ }
+
fn compile_cmd(
&self,
args: &[String],