load android custom client for jvm startServer

This commit is contained in:
rustdesk
2024-04-16 21:46:54 +08:00
parent b9792fc17d
commit 01ec539065
3 changed files with 6 additions and 4 deletions

View File

@@ -2116,12 +2116,16 @@ pub mod server_side {
env: JNIEnv,
_class: JClass,
app_dir: JString,
custom_client_config: JString,
) {
log::debug!("startServer from jvm");
let mut env = env;
if let Ok(app_dir) = env.get_string(&app_dir) {
*config::APP_DIR.write().unwrap() = app_dir.into();
}
if let Ok(custom_client_config) = env.get_string(&custom_client_config) {
crate::read_custom_client(custom_client_config);
}
std::thread::spawn(move || start_server(true));
}