Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f744a677 authored by Tommaso Fonda's avatar Tommaso Fonda
Browse files

Updater: Show the correct percentage during package installation

Fixes the mismatch between the progress bar's status and the percentage
displayed next to it.

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/4830
Change-Id: I5c243acda4f06561cbd5b3a73060205b32d8d41d
parent 7a6aa634
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -185,6 +185,9 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter.
                    update.getFinalizing() ?
                            R.string.finalizing_package :
                            R.string.preparing_ota_first_boot);
            String percentage = NumberFormat.getPercentInstance().format(
                    update.getInstallProgress() / 100.f);
            viewHolder.mPercentage.setText(percentage);
            viewHolder.mProgressBar.setIndeterminate(false);
            viewHolder.mProgressBar.setProgress(update.getInstallProgress());
        } else if (mUpdaterController.isVerifyingUpdate(downloadId)) {