build android
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
		
							parent
							
								
									589ad940cd
								
							
						
					
					
						commit
						0d2113cd29
					
				| @ -18,6 +18,8 @@ use sha2::{Digest, Sha256}; | ||||
| use uuid::Uuid; | ||||
| 
 | ||||
| pub use file_trait::FileManager; | ||||
| #[cfg(not(any(target_os = "android", target_os = "ios")))] | ||||
| use hbb_common::tokio::sync::mpsc::UnboundedSender; | ||||
| use hbb_common::{ | ||||
|     allow_err, | ||||
|     anyhow::{anyhow, Context}, | ||||
| @ -34,7 +36,7 @@ use hbb_common::{ | ||||
|     socket_client, | ||||
|     sodiumoxide::crypto::{box_, secretbox, sign}, | ||||
|     timeout, | ||||
|     tokio::{sync::mpsc::UnboundedSender, time::Duration}, | ||||
|     tokio::time::Duration, | ||||
|     AddrMangle, ResultType, Stream, | ||||
| }; | ||||
| pub use helper::LatencyController; | ||||
| @ -1240,6 +1242,7 @@ impl LoginConfigHandler { | ||||
|             self.save_config(config); | ||||
|         } | ||||
|         #[cfg(feature = "flutter")] | ||||
|         #[cfg(not(any(target_os = "android", target_os = "ios")))] | ||||
|         if name == "disable-clipboard" { | ||||
|             crate::flutter::update_text_clipboard_required(); | ||||
|         } | ||||
|  | ||||
| @ -233,6 +233,7 @@ impl<T: InvokeUiSession> Remote<T> { | ||||
|                     .msgbox("error", "Connection Error", &err.to_string(), ""); | ||||
|             } | ||||
|         } | ||||
|         #[cfg(not(any(target_os = "android", target_os = "ios")))] | ||||
|         Client::try_stop_clipboard(&self.handler.id); | ||||
|     } | ||||
| 
 | ||||
| @ -841,13 +842,16 @@ impl<T: InvokeUiSession> Remote<T> { | ||||
|                             let permission_config = self.handler.get_permission_config(); | ||||
| 
 | ||||
|                             #[cfg(feature = "flutter")] | ||||
|                             #[cfg(not(any(target_os = "android", target_os = "ios")))] | ||||
|                             Client::try_start_clipboard(None); | ||||
|                             #[cfg(not(feature = "flutter"))] | ||||
|                             #[cfg(not(any(target_os = "android", target_os = "ios")))] | ||||
|                             Client::try_start_clipboard(Some(( | ||||
|                                 permission_config.clone(), | ||||
|                                 sender.clone(), | ||||
|                             ))); | ||||
| 
 | ||||
|                             #[cfg(not(any(target_os = "android", target_os = "ios")))] | ||||
|                             tokio::spawn(async move { | ||||
|                                 // due to clipboard service interval time
 | ||||
|                                 sleep(common::CLIPBOARD_INTERVAL as f32 / 1_000.).await; | ||||
| @ -1050,12 +1054,14 @@ impl<T: InvokeUiSession> Remote<T> { | ||||
|                         match p.permission.enum_value_or_default() { | ||||
|                             Permission::Keyboard => { | ||||
|                                 #[cfg(feature = "flutter")] | ||||
|                                 #[cfg(not(any(target_os = "android", target_os = "ios")))] | ||||
|                                 crate::flutter::update_text_clipboard_required(); | ||||
|                                 *self.handler.server_keyboard_enabled.write().unwrap() = p.enabled; | ||||
|                                 self.handler.set_permission("keyboard", p.enabled); | ||||
|                             } | ||||
|                             Permission::Clipboard => { | ||||
|                                 #[cfg(feature = "flutter")] | ||||
|                                 #[cfg(not(any(target_os = "android", target_os = "ios")))] | ||||
|                                 crate::flutter::update_text_clipboard_required(); | ||||
|                                 *self.handler.server_clipboard_enabled.write().unwrap() = p.enabled; | ||||
|                                 self.handler.set_permission("clipboard", p.enabled); | ||||
|  | ||||
| @ -1,11 +1,13 @@ | ||||
| use crate::{ | ||||
|     client::file_trait::FileManager, | ||||
|     common::make_fd_to_json, | ||||
|     common::{get_default_sound_input, is_keyboard_mode_supported}, | ||||
|     common::is_keyboard_mode_supported, | ||||
|     flutter::{self, SESSIONS}, | ||||
|     flutter::{session_add, session_start_}, | ||||
|     ui_interface::{self, *}, | ||||
| }; | ||||
| #[cfg(not(any(target_os = "android", target_os = "ios")))] | ||||
| use crate::common::get_default_sound_input; | ||||
| use flutter_rust_bridge::{StreamSink, SyncReturn}; | ||||
| use hbb_common::{ | ||||
|     config::{self, LocalConfig, PeerConfig, ONLINE}, | ||||
|  | ||||
| @ -5,7 +5,9 @@ use crate::common::GrabState; | ||||
| use crate::flutter::{CUR_SESSION_ID, SESSIONS}; | ||||
| #[cfg(not(any(feature = "flutter", feature = "cli")))] | ||||
| use crate::ui::CUR_SESSION; | ||||
| use hbb_common::{log, message_proto::*}; | ||||
| use hbb_common::message_proto::*; | ||||
| #[cfg(not(any(target_os = "android", target_os = "ios")))] | ||||
| use hbb_common::log; | ||||
| use rdev::{Event, EventType, Key}; | ||||
| #[cfg(any(target_os = "windows", target_os = "macos"))] | ||||
| use std::sync::atomic::{AtomicBool, Ordering}; | ||||
|  | ||||
| @ -1,3 +1,4 @@ | ||||
| #[cfg(not(any(target_os = "android", target_os = "ios")))] | ||||
| use std::collections::HashMap; | ||||
| use std::ops::{Deref, DerefMut}; | ||||
| use std::str::FromStr; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user