Files
lawnchair/src
SuperDragonXD bac85d2915 refactor(permissions): Unify file and media permission handling (#5683)
This commit completes the work started in the search refactor by migrating all remaining legacy file/media permission checks to the new, centralized `FileAccessManager`.

Previously, features like the wallpaper preview and backup system used the side-effect based permission model that created a poor user experience, especially on modern Android versions.

This change unifies all file and media access logic under the new, observable `StateFlow`-based system. This includes:

- Refactoring the wallpaper drawable access logic to correctly handle the various states of media permissions on Android 13+. This is disabled by default on Play Store builds, due to lack of `MANAGE_EXTERNAL_STORAGE` permission.
- Updating the backup/restore system to use the new manager.
- Updating the blur wallpaper feature to use the new manager.
- Migrating the OTA update check to use the new manager.
- Replacing the "Notification Dots" permission bottom sheet with the new, simpler `PermissionDialog` for UI consistency.

Credit-to: @lebao3105 for the initial analysis of the wallpaper permission issue.

Fixes #5632
Fixes #5676
2025-07-30 12:43:37 +08:00
..