mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
[android] fix build; ignore battery optimizations
This commit is contained in:
@@ -260,7 +260,7 @@ class PermissionManager {
|
||||
static Timer? _timer;
|
||||
static var _current = "";
|
||||
|
||||
static final permissions = ["audio", "file"];
|
||||
static final permissions = ["audio", "file", "ignore_battery_optimizations"];
|
||||
|
||||
static bool isWaitingFile() {
|
||||
if (_completer != null) {
|
||||
@@ -279,9 +279,12 @@ class PermissionManager {
|
||||
if (!permissions.contains(type))
|
||||
return Future.error("Wrong permission!$type");
|
||||
|
||||
FFI.invokeMethod("request_permission", type);
|
||||
if (type == "ignore_battery_optimizations") {
|
||||
return Future.value(false);
|
||||
}
|
||||
_current = type;
|
||||
_completer = Completer<bool>();
|
||||
FFI.invokeMethod("request_permission", type);
|
||||
|
||||
// timeout
|
||||
_timer?.cancel();
|
||||
|
||||
Reference in New Issue
Block a user