From 13dad848bd8273c5ad8cba15d1b203f0c9bfb773 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 18 Nov 2017 14:17:26 +0800 Subject: [PATCH] Fix download progress bug for modules larger than 20MB --- .../main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java b/app/src/main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java index 72c48b40d..3997b996d 100644 --- a/app/src/main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java +++ b/app/src/main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java @@ -179,7 +179,7 @@ public class ProcessRepoZip extends ParallelTask { private void updateDlProgress(int step) { progress += step; - progressDialog.setMessage(getActivity().getString(R.string.zip_download_msg, 100 * progress / total)); + progressDialog.setMessage(getActivity().getString(R.string.zip_download_msg, (int) (100 * (double) progress / total + 0.5))); } @Override