diff --git a/src/org/lineageos/updater/UpdatesActivity.java b/src/org/lineageos/updater/UpdatesActivity.java index 7f07004..593065a 100644 --- a/src/org/lineageos/updater/UpdatesActivity.java +++ b/src/org/lineageos/updater/UpdatesActivity.java @@ -64,6 +64,7 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.UUID; public class UpdatesActivity extends UpdatesListActivity { @@ -317,7 +318,7 @@ public class UpdatesActivity extends UpdatesListActivity { private void downloadUpdatesList(final boolean manualRefresh) { final File jsonFile = Utils.getCachedUpdateList(this); - final File jsonFileTmp = new File(jsonFile.getAbsolutePath() + ".tmp"); + final File jsonFileTmp = new File(jsonFile.getAbsolutePath() + UUID.randomUUID()); String url = Utils.getServerURL(this); Log.d(TAG, "Checking " + url); diff --git a/src/org/lineageos/updater/UpdatesCheckReceiver.java b/src/org/lineageos/updater/UpdatesCheckReceiver.java index 9332bd9..c7f1b4e 100644 --- a/src/org/lineageos/updater/UpdatesCheckReceiver.java +++ b/src/org/lineageos/updater/UpdatesCheckReceiver.java @@ -39,6 +39,7 @@ import java.io.IOException; import java.util.Calendar; import java.util.Date; import java.util.List; +import java.util.UUID; public class UpdatesCheckReceiver extends BroadcastReceiver { @@ -74,7 +75,7 @@ public class UpdatesCheckReceiver extends BroadcastReceiver { } final File json = Utils.getCachedUpdateList(context); - final File jsonNew = new File(json.getAbsolutePath() + ".tmp"); + final File jsonNew = new File(json.getAbsolutePath() + UUID.randomUUID()); String url = Utils.getServerURL(context); DownloadClient.DownloadCallback callback = new DownloadClient.DownloadCallback() { @Override