Remove unknwon files that are in the downloads dir

The files are supposed to be downloaded in a privileged location
that the user can't access. If the user wipes the data of the
application, the updates downloaded are not removed. Perform a
one-time cleanup so that our downloads dir doesn't grow without
control.
This commit is contained in:
Gabriele M
2017-07-08 01:09:22 +02:00
parent 6534932b20
commit efa829358d
4 changed files with 51 additions and 0 deletions
@@ -46,6 +46,8 @@ public class UpdatesCheckReceiver extends BroadcastReceiver {
if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
// Set a repeating alarm on boot to check for new updates once per day
scheduleRepeatingUpdatesCheck(context);
Utils.cleanupDownloadsDir(context);
}
final SharedPreferences preferences =