From 3cb130d40a24e337d2bd11f33bf1ff091c48ab53 Mon Sep 17 00:00:00 2001 From: Salvo Giangreco Date: Wed, 2 Oct 2024 18:14:22 +0200 Subject: [PATCH] Updater: Fix broken download ETA/progress Change-Id: I1d7b5ecf7779d08c5d617d8c0950b24fbe7d0733 --- .../org/lineageos/updater/download/HttpURLConnectionClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/lineageos/updater/download/HttpURLConnectionClient.java b/app/src/main/java/org/lineageos/updater/download/HttpURLConnectionClient.java index b9c4b5dc..63067616 100644 --- a/app/src/main/java/org/lineageos/updater/download/HttpURLConnectionClient.java +++ b/app/src/main/java/org/lineageos/updater/download/HttpURLConnectionClient.java @@ -282,7 +282,7 @@ public class HttpURLConnectionClient implements DownloadClient { InputStream inputStream = mClient.getInputStream(); OutputStream outputStream = new FileOutputStream(mDestination, mResume) ) { - mTotalBytes = mClient.getContentLength() + mTotalBytesRead; + mTotalBytes = mClient.getContentLengthLong() + mTotalBytesRead; byte[] b = new byte[8192]; int count; while (!isInterrupted() && (count = inputStream.read(b)) > 0) {