Fix a couple of typos

This commit is contained in:
Gabriele M
2017-07-18 22:15:13 +02:00
parent 82dbc8fde3
commit 341eec0b28
2 changed files with 4 additions and 4 deletions

View File

@@ -154,10 +154,10 @@ public class UpdaterController implements UpdaterControllerInt {
public void onResponse(int statusCode, String url, DownloadClient.Headers headers) { public void onResponse(int statusCode, String url, DownloadClient.Headers headers) {
final UpdateDownload update = mDownloads.get(downloadId).mUpdate; final UpdateDownload update = mDownloads.get(downloadId).mUpdate;
if (update.getFileSize() <= 0) { if (update.getFileSize() <= 0) {
String contentLenght = headers.get("Content-Length"); String contentLength = headers.get("Content-Length");
if (contentLenght != null) { if (contentLength != null) {
try { try {
long size = Long.parseLong(contentLenght); long size = Long.parseLong(contentLength);
if (size > 0) { if (size > 0) {
update.setFileSize(size); update.setFileSize(size);
} }

View File

@@ -204,7 +204,7 @@ class OkHttpDownloadClient implements DownloadClient {
try { try {
body.close(); body.close();
} catch (IOException e) { } catch (IOException e) {
Log.e(TAG, "Could not close reponse body", e); Log.e(TAG, "Could not close response body", e);
} }
} }
} }