6556: add AdvancedPrivacy App Id in trackers stats to avoid appUid aliasing
Description
Advanced Privacy wrongly detect trackers : like various trackers on F-Droid. We don't have a scenario to reproduce and then analyse precisely the problem behind this behavior, but it really looks like the trackers from on app are attached to another app, and the reason would be that the id used by advanced privacy for apps isn't totally stable.
This fix relly on this analysis, and add package name and profile id flag to create the "advanced privacy id" for each app. With this implementation, the current behavior will occurs:
On Advanced Privacy update to this version:
- All data in the "Manage trackers used in applications" will be reseted
- The detailled page for each app will be rested to.
But:
- the whitelists settings will be kept (whitelisted app will stay whitelisted, and whitelisted trackers for a specific app will stays whitelisted, when it detected again)
- blocked/leaked statistics willbe kept, graph won't be impacted by this update.
Technical details
This change implies a schema migration on the database. The sqlite's version embeded in Android doesn't handle DOP COLUMN feature, so database for upgrading users will keep a useless and empty column.
Issues
https://gitlab.e.foundation/e/backlog/-/issues/6556