We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aac0293 commit 85bde74Copy full SHA for 85bde74
src/Essentials/src/Permissions/Permissions.android.cs
@@ -102,7 +102,9 @@ public override async Task<PermissionStatus> RequestAsync()
102
return PermissionStatus.Granted;
103
104
var permissionResult = await DoRequest(runtimePermissions);
105
- if (permissionResult.GrantResults.Any(g => g == Permission.Denied))
+ // OnRequestPermissionsResult can be called with an empty grantResults array if the user interaction was interrupted.
106
+ // Ignoring this could lead to incorrect assumptions that permissions were granted.
107
+ if (permissionResult.GrantResults.Length == 0 || permissionResult.GrantResults.Any(g => g == Permission.Denied))
108
return PermissionStatus.Denied;
109
110
0 commit comments