migrate to account removed callback from account manager and unify permissions across adding and removing account.
Description
Migrate to the in-house account removed broadcast mechanism.
Technical details
The system's account removed broadcast is unreliable and was causing stale account information issues in the mail app. Although this issue has not yet been reported in this app, it is likely affected as well. This MR migrates the app to use our in-house broadcast solution to address these problems.
Tests
manually tested by adding and removing account. see testing in AccountManager#176
Issues
see 3705
10 commandments of code review
Summary by CodeRabbit
-
Bug Fixes
- More reliable handling of account removal events to prevent missed cleanup and improve behavior on devices with updated account management.
-
Chores
- Updated app permission and broadcast intent usage to align with modern account event standards, and adjusted receiver export/permission settings for compatibility and security.
-
Localization
- Minor plural string metadata update for a Portuguese (pt-BR) resource to suppress unused-quantity warnings.
Edited by CodeRabbitAI