Skip to content
Snippets Groups Projects
Commit 00f449b8 authored by cyberta's avatar cyberta
Browse files

remove redundant check for file deletion if app update failed

parent a41c9876
Branches
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment