mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-02-05 12:42:34 -05:00
This moves the cache file deletion to a dedicated IntentService that runs at the lowest possible priority. The cache cleanup does not need to happen with any kind of priority, so it shouldn't delay the app start or take any resources away from foreground processes. This also changes the logic around the "Cache packages" preference. The downloader always saves APKs, then if "Cache packages" is disabled, those APKs are deleted when they are older than an hour. This also simplifies Utils.deleteFiles() since the endswith arg is no longer needed.