android request external stroage when start service for log (#8161)

This will not influence file transfer permission. Requesting external storage permissions does not turn on file transfer permissions, and turning off file transfer permissions does not turn off external storage permissions.

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2024-05-27 21:01:09 +08:00 committed by GitHub
parent c7308dbbc9
commit fcece3732c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -367,6 +367,9 @@ class ServerModel with ChangeNotifier {
}
} else {
await checkRequestNotificationPermission();
if (!await AndroidPermissionManager.check(kManageExternalStorage)) {
await AndroidPermissionManager.request(kManageExternalStorage);
}
final res = await parent.target?.dialogManager
.show<bool>((setState, close, context) {
submit() => close(true);