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:
@@ -79,6 +79,8 @@ public class UpdaterController implements UpdaterControllerInt {
|
||||
mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Updater");
|
||||
mWakeLock.setReferenceCounted(false);
|
||||
|
||||
Utils.cleanupDownloadsDir(context);
|
||||
|
||||
for (UpdateDownload update : mUpdatesDbHelper.getUpdates()) {
|
||||
addUpdate(update, false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user