refactor all [setByName] [getByName] to async bridge function

This commit is contained in:
csf
2022-08-08 22:27:27 +08:00
parent c5d0628291
commit e420178750
18 changed files with 332 additions and 470 deletions

View File

@@ -5,7 +5,7 @@ use crate::clipboard_file::*;
use crate::common::update_clipboard;
use crate::video_service;
#[cfg(any(target_os = "android", target_os = "ios"))]
use crate::{common::FLUTTER_INFO2, flutter::connection_manager::start_channel};
use crate::{common::DEVICE_NAME, flutter::connection_manager::start_channel};
use crate::{ipc, VERSION};
use hbb_common::{
config::Config,
@@ -643,7 +643,7 @@ impl Connection {
}
#[cfg(target_os = "android")]
{
pi.hostname = FLUTTER_INFO2.lock().unwrap().clone();
pi.hostname = DEVICE_NAME.lock().unwrap().clone();
pi.platform = "Android".into();
}
#[cfg(feature = "hwcodec")]