Fix a couple of typos
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user