From b436dba0d999d767497eed437881bab74f4df7ba Mon Sep 17 00:00:00 2001 From: rustdesk Date: Tue, 19 Apr 2022 23:43:55 +0800 Subject: [PATCH] remove link and wake lock for service start/stop --- android/app/src/main/jniLibs/arm64-v8a/libc++_shared.so | 1 - android/app/src/main/jniLibs/arm64-v8a/libcrypto.so | 1 - android/app/src/main/jniLibs/arm64-v8a/librustdesk.so | 1 - android/app/src/main/jniLibs/arm64-v8a/libssl.so | 1 - android/key.properties | 1 - lib/models/server_model.dart | 3 +++ 6 files changed, 3 insertions(+), 5 deletions(-) delete mode 120000 android/app/src/main/jniLibs/arm64-v8a/libc++_shared.so delete mode 120000 android/app/src/main/jniLibs/arm64-v8a/libcrypto.so delete mode 120000 android/app/src/main/jniLibs/arm64-v8a/librustdesk.so delete mode 120000 android/app/src/main/jniLibs/arm64-v8a/libssl.so delete mode 120000 android/key.properties diff --git a/android/app/src/main/jniLibs/arm64-v8a/libc++_shared.so b/android/app/src/main/jniLibs/arm64-v8a/libc++_shared.so deleted file mode 120000 index fcc847538..000000000 --- a/android/app/src/main/jniLibs/arm64-v8a/libc++_shared.so +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../.android/libc++_shared.so \ No newline at end of file diff --git a/android/app/src/main/jniLibs/arm64-v8a/libcrypto.so b/android/app/src/main/jniLibs/arm64-v8a/libcrypto.so deleted file mode 120000 index 0974e8561..000000000 --- a/android/app/src/main/jniLibs/arm64-v8a/libcrypto.so +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../.android/libcrypto.so \ No newline at end of file diff --git a/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so b/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so deleted file mode 120000 index d614db955..000000000 --- a/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../.android/liblibrustdesk.so \ No newline at end of file diff --git a/android/app/src/main/jniLibs/arm64-v8a/libssl.so b/android/app/src/main/jniLibs/arm64-v8a/libssl.so deleted file mode 120000 index dac4f4a54..000000000 --- a/android/app/src/main/jniLibs/arm64-v8a/libssl.so +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../.android/libssl.so \ No newline at end of file diff --git a/android/key.properties b/android/key.properties deleted file mode 120000 index 6dc71cf47..000000000 --- a/android/key.properties +++ /dev/null @@ -1 +0,0 @@ -/Users/hzhou/.android/key.properties \ No newline at end of file diff --git a/lib/models/server_model.dart b/lib/models/server_model.dart index 9668758e2..18d7f4652 100644 --- a/lib/models/server_model.dart +++ b/lib/models/server_model.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:convert'; import 'package:dash_chat/dash_chat.dart'; import 'package:flutter/material.dart'; +import 'package:wakelock/wakelock.dart'; import '../common.dart'; import '../pages/server_page.dart'; import 'model.dart'; @@ -208,6 +209,7 @@ class ServerModel with ChangeNotifier { FFI.setByName("start_service"); getIDPasswd(); updateClientState(); + Wakelock.enable(); } Future stopService() async { @@ -218,6 +220,7 @@ class ServerModel with ChangeNotifier { await FFI.invokeMethod("stop_service"); FFI.setByName("stop_service"); notifyListeners(); + Wakelock.disable(); } Future initInput() async {