Skip to content

fix: Guard MonitorService start against missing Bluetooth permissions#381

Merged
d4rken merged 1 commit intomainfrom
fix/monitor-service-permission-check
Feb 9, 2026
Merged

fix: Guard MonitorService start against missing Bluetooth permissions#381
d4rken merged 1 commit intomainfrom
fix/monitor-service-permission-check

Conversation

@d4rken
Copy link
Copy Markdown
Member

@d4rken d4rken commented Feb 9, 2026

Summary

  • Add Bluetooth permission check in MonitorControl.startMonitor() to prevent SecurityException crash when starting the foreground service before permissions are granted (e.g. fresh install)
  • Catch SecurityException as a safety net for race conditions
  • Update architecture.md to reflect the WorkManager → ForegroundService refactoring

Test plan

  • Fresh install: app should show permission cards without crashing
  • After granting permissions: monitor service starts automatically
  • Boot receiver and Bluetooth event receiver paths are also guarded

@d4rken d4rken added the bug Something isn't working label Feb 9, 2026
@d4rken d4rken merged commit cfed733 into main Feb 9, 2026
9 checks passed
@d4rken d4rken deleted the fix/monitor-service-permission-check branch February 9, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant