mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-13 00:01:00 +03:00
fix: android clipboard permission (#10223)
* fix: android clipboard permission Signed-off-by: fufesou <linlong1266@gmail.com> * refact: Android, clipboard, floating ball Call rust to check if clipboard is enabled. Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -280,15 +280,6 @@ pub fn close(id: i32) {
|
||||
};
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(target_os = "android")]
|
||||
pub fn notify_input_control(v: bool) {
|
||||
for (_, mut client) in CLIENTS.write().unwrap().iter_mut() {
|
||||
client.keyboard = v;
|
||||
allow_err!(client.tx.send(Data::InputControl(v)));
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn remove(id: i32) {
|
||||
CLIENTS.write().unwrap().remove(&id);
|
||||
@@ -312,6 +303,17 @@ pub fn switch_permission(id: i32, name: String, enabled: bool) {
|
||||
};
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(target_os = "android")]
|
||||
pub fn switch_permission_all(name: String, enabled: bool) {
|
||||
for (_, client) in CLIENTS.read().unwrap().iter() {
|
||||
allow_err!(client.tx.send(Data::SwitchPermission {
|
||||
name: name.clone(),
|
||||
enabled
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
|
||||
#[inline]
|
||||
pub fn get_clients_state() -> String {
|
||||
|
||||
Reference in New Issue
Block a user