remove android build warns

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-03-27 19:13:29 +08:00
parent 3c69773e64
commit 8cb361c51e
15 changed files with 101 additions and 43 deletions

View File

@@ -168,14 +168,12 @@ pub fn session_reconnect(id: String, force_relay: bool) {
}
pub fn session_toggle_option(id: String, value: String) {
let mut is_found = false;
if let Some(session) = SESSIONS.write().unwrap().get_mut(&id) {
is_found = true;
log::warn!("toggle option {}", &value);
session.toggle_option(value.clone());
}
#[cfg(not(any(target_os = "android", target_os = "ios")))]
if is_found && value == "disable-clipboard" {
if SESSIONS.read().unwrap().get(&id).is_some() && value == "disable-clipboard" {
crate::flutter::update_text_clipboard_required();
}
}
@@ -338,10 +336,10 @@ pub fn session_handle_flutter_key_event(
}
}
pub fn session_enter_or_leave(id: String, enter: bool) {
pub fn session_enter_or_leave(_id: String, _enter: bool) {
#[cfg(not(any(target_os = "android", target_os = "ios")))]
if let Some(session) = SESSIONS.read().unwrap().get(&id) {
if enter {
if let Some(session) = SESSIONS.read().unwrap().get(&_id) {
if _enter {
session.enter();
} else {
session.leave();
@@ -1405,7 +1403,7 @@ pub mod server_side {
#[no_mangle]
pub unsafe extern "system" fn Java_com_carriez_flutter_1hbb_MainService_startService(
env: JNIEnv,
_env: JNIEnv,
_class: JClass,
) {
log::debug!("startService from jvm");