tech:148: Refac app list repository to handle apps with location permission.
Description
Technical MR, to refactor the preparation of the list of installed apps on the device, which is a complicated part of the AdvancedPrivacy app.
It also prepare the implementation of the whitelist app for Fakelocation feature.
Screenshots
No changes.
Technical details
Previous implementation relied on separated list for each categories of apps :
- one for the "compatibilities apps", which are all hidden behind the compatibility app on the UI
- one for the hidden system components, which are all hidden behind the system app in the UI
- one for the other apps, and it separated by profiles types.
This lead to complicated algorythm when the user apply setting on the system or compatibility dummy app.
This MR implement a different approch : we manipulate a new model of app in the ui : the DisplayableApp . And each of them hold a list of real. This new type hold also a variety of flags which allow to easily filter the list of app we want to display in each specific places.
Tests
Issues
related to &148 (closed)
10 commandments of code reviews
Summary by CodeRabbit
-
New Features
- Major improvements to application management and data representation using a new
DisplayableApp
model. - Enhanced background processing with a new coroutine scope setup.
- Streamlined application retrieval logic for better efficiency.
- New functionality for managing app states through a
ToggleableApp
class. - Enhanced app privacy management features with targeted handling of applications using Tor.
- Major improvements to application management and data representation using a new
-
Bug Fixes
- Resolved issues with application identifiers and improved data handling in the UI.
-
Refactor
- Replaced all instances of
ApplicationDescription
withDisplayableApp
across multiple components. - Simplified the structure and logic in various use cases and adapters to support the new data model.
- Improved the repository interface for application data management.
- Replaced all instances of
-
Chores
- Updated copyright notices across several files to reflect 2024.