fix build android

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-03-11 18:11:19 +08:00
parent e7bf41e6fc
commit 411ddb949b

View File

@ -543,6 +543,7 @@ impl Connection {
if let Some(s) = conn.server.upgrade() { if let Some(s) = conn.server.upgrade() {
let mut s = s.write().unwrap(); let mut s = s.write().unwrap();
s.remove_connection(&conn.inner); s.remove_connection(&conn.inner);
#[cfg(not(any(target_os = "android", target_os = "ios")))]
try_stop_record_cursor_pos(); try_stop_record_cursor_pos();
} }
log::info!("#{} connection loop exited", id); log::info!("#{} connection loop exited", id);
@ -951,6 +952,7 @@ impl Connection {
noperms.push(super::audio_service::NAME); noperms.push(super::audio_service::NAME);
} }
let mut s = s.write().unwrap(); let mut s = s.write().unwrap();
#[cfg(not(any(target_os = "android", target_os = "ios")))]
try_start_record_cursor_pos(); try_start_record_cursor_pos();
s.add_connection(self.inner.clone(), &noperms); s.add_connection(self.inner.clone(), &noperms);
} }
@ -1740,6 +1742,7 @@ impl Connection {
self.lock_after_session_end = q == BoolOption::Yes; self.lock_after_session_end = q == BoolOption::Yes;
} }
} }
#[cfg(not(any(target_os = "android", target_os = "ios")))]
if let Ok(q) = o.show_remote_cursor.enum_value() { if let Ok(q) = o.show_remote_cursor.enum_value() {
if q != BoolOption::NotSet { if q != BoolOption::NotSet {
self.show_remote_cursor = q == BoolOption::Yes; self.show_remote_cursor = q == BoolOption::Yes;