diff options
Diffstat (limited to 'app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/UpdateDownloadManager.java')
-rw-r--r-- | app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/UpdateDownloadManager.java | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/UpdateDownloadManager.java b/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/UpdateDownloadManager.java index 698a0d17..f2eabc7b 100644 --- a/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/UpdateDownloadManager.java +++ b/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/UpdateDownloadManager.java @@ -22,8 +22,6 @@ import android.os.Bundle; import android.os.ResultReceiver; import android.util.Log; -import androidx.annotation.NonNull; - import java.io.File; import okhttp3.OkHttpClient; @@ -114,7 +112,6 @@ public class UpdateDownloadManager implements Logger, DownloadConnector.Download sendToReceiverOrBroadcast(receiver, UPDATE_DOWNLOAD_FAILED, result); } break; - } } @@ -164,23 +161,6 @@ public class UpdateDownloadManager implements Logger, DownloadConnector.Download return task; } - private static void clearPreviousDownloads(@NonNull Context context, String destinationFile) { - File directory = context.getExternalFilesDir(null); - - if (directory == null) { - Log.w(TAG, "Failed to read external files directory."); - return; - } - - for (File file : directory.listFiles()) { - if (file.getName().equals(destinationFile)) { - if (file.delete()) { - Log.d(TAG, "Deleted " + file.getName()); - } - } - } - } - private Bundle checkVersionFile(Bundle task) { OkHttpClient client = clientGenerator.init(); String versionString = DownloadConnector.requestTextFileFromServer(BuildConfig.version_file_url, client); |