From 9d0f8d9886b0c42cdd3eb8fd0f2ba62dabee392d Mon Sep 17 00:00:00 2001 From: rustdesk Date: Sun, 3 Dec 2023 20:51:53 +0800 Subject: [PATCH] Fix #616: add rustdesk://password/ for android only --- flutter/lib/common.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index 9bd4b091e..7da56ec66 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -1970,6 +1970,16 @@ List? urlLinkToCmdArgs(Uri uri) { importConfig(null, null, config); }); return null; + } else if (uri.authority == "password") { + if (Platform.isAndroid) { + final password = uri.path.substring("/".length); + if (password.isNotEmpty) { + Timer(Duration(seconds: 1), () async { + await bind.mainSetPermanentPassword(password: password); + showToast(translate('Successful')); + }); + } + } } else if (options.contains(uri.authority)) { final optionIndex = options.indexOf(uri.authority); command = '--${uri.authority}';