Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Windows runtime validation is still needed to confirm that AppCapability reflects both microphone privacy toggles and returns to granted access when re-enabled in unpackaged Flutter apps.
No open issues 🎉
What changed in this PR
Addresses #1507 by checking Windows microphone access through AppCapability instead of always reporting it as granted. Other permission groups retain their existing behavior.
Changes:
- Shares microphone status checking between
checkPermissionStatusandrequestPermissions, mapping access results and WinRT errors to permission statuses. - Adds integer argument validation for
checkPermissionStatus.
| File | Description |
|---|---|
permission_handler_windows/windows/permission_handler_windows_plugin.cpp |
Adds AppCapability-based microphone checks and permission argument validation. |
Review effort: Balanced
|
Note on the failing CI checks (\windows / permission_handler_windows\ and \�pp_facing / permission_handler): both fail in \lutter analyze\ on Flutter \stable-3.50.1\ due to a pre-existing \deprecated_member_use\ info lint on \package:flutter/material.dart\ in \example/lib/main.dart:4:1, which is unrelated to the C++ change in \permission_handler_windows_plugin.cpp. |
checkPermissionStatus and
equestPermissions on Windows currently return GRANTED unconditionally for every permission group, so disabling microphone access in Windows Privacy settings has no effect on Permission.microphone.status.
This queries Windows::Security::Authorization::AppCapabilityAccess::AppCapability::Create(Lmicrophone).CheckAccess() for PermissionGroup::MICROPHONE and maps:
Other permission groups keep their existing behavior.
Fixes #1507
Pre-launch Checklist