android opt:add disable ignore_battery_optimizations

This commit is contained in:
csf
2022-07-16 22:31:44 +08:00
parent d3fc6ccd9c
commit 88fef77980
7 changed files with 93 additions and 36 deletions

View File

@@ -286,5 +286,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Language", "语言"),
("Keep RustDesk background service", "保持RustDesk后台服务"),
("Ignore Battery Optimizations", "忽略电池优化"),
("android_open_battery_optimizations_tip", "如需关闭此功能请在接下来的RustDesk应用设置页面中找到并进入 [电源] 页面,取消勾选 [不受限制]"),
].iter().cloned().collect();
}

View File

@@ -27,5 +27,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("doc_mac_permission", "https://rustdesk.com/docs/en/manual/mac/#enable-permissions"),
("doc_fix_wayland", "https://rustdesk.com/docs/en/manual/linux/#x11-required"),
("server_not_support", "Not yet supported by the server"),
("android_open_battery_optimizations_tip", "If you want to disable this feature, please go to the next RustDesk application settings page, find and enter [Battery] ,Uncheck [Unrestricted]"),
].iter().cloned().collect();
}

View File

@@ -130,6 +130,9 @@ unsafe extern "C" fn get_by_name(name: *const c_char, arg: *const c_char) -> *co
.clone()
.to_string();
}
"langs" => {
res = crate::lang::LANGS.to_string();
}
// File Action
"get_home_dir" => {
res = fs::get_home_as_string();