From 00f449b80ea1704d1772e580e4ce16beac5039bf Mon Sep 17 00:00:00 2001 From: cyBerta Date: Mon, 28 Dec 2020 16:14:49 +0100 Subject: remove redundant check for file deletion if app update failed --- .../se.leap.bitmaskclient/appUpdate/DownloadBroadcastReceiver.java | 7 ------- 1 file changed, 7 deletions(-) (limited to 'app/src') diff --git a/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadBroadcastReceiver.java b/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadBroadcastReceiver.java index 4719737b..525c3c9b 100644 --- a/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadBroadcastReceiver.java +++ b/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadBroadcastReceiver.java @@ -22,8 +22,6 @@ import android.content.Intent; import android.os.Bundle; import android.widget.Toast; -import java.io.File; - import se.leap.bitmaskclient.Constants; import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.utils.PreferenceHelper; @@ -40,7 +38,6 @@ import static se.leap.bitmaskclient.appUpdate.DownloadService.UPDATE_FOUND; import static se.leap.bitmaskclient.appUpdate.DownloadService.UPDATE_NOT_FOUND; import static se.leap.bitmaskclient.appUpdate.DownloadService.VERIFICATION_ERROR; import static se.leap.bitmaskclient.appUpdate.DownloadServiceCommand.DOWNLOAD_UPDATE; -import static se.leap.bitmaskclient.appUpdate.UpdateDownloadManager.getUpdateFile; public class DownloadBroadcastReceiver extends BroadcastReceiver { @@ -84,10 +81,6 @@ public class DownloadBroadcastReceiver extends BroadcastReceiver { } else { Toast.makeText(context.getApplicationContext(), context.getString(R.string.version_update_error), Toast.LENGTH_LONG).show(); } - File file = getUpdateFile(context); - if (file.exists()) { - file.delete(); - } break; case DOWNLOAD_PROGRESS: int progress = resultData.getInt(PROGRESS_VALUE, 0); -- cgit v1.2.3