From 7c4ead1651978c211877e1a32d8b5c411ce81519 Mon Sep 17 00:00:00 2001 From: althafvly Date: Thu, 23 Feb 2023 10:08:27 +0530 Subject: [PATCH] Updater: ignore dialog if space is below 1mb Change-Id: Ife38e01a194ac5fddd92083e92deec8d332341dc --- .../lineageos/updater/UpdatesListAdapter.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/org/lineageos/updater/UpdatesListAdapter.java b/src/org/lineageos/updater/UpdatesListAdapter.java index 3e5f7c65..7418cd72 100644 --- a/src/org/lineageos/updater/UpdatesListAdapter.java +++ b/src/org/lineageos/updater/UpdatesListAdapter.java @@ -326,12 +326,16 @@ public class UpdatesListAdapter extends RecyclerView.Adapter= 1) { + String message = resources.getString(R.string.dialog_free_space_low_message_pct, + new DecimalFormat("# MB").format(spaceNeeded)); + return new AlertDialog.Builder(mActivity) + .setTitle(R.string.dialog_free_space_low_title) + .setMessage(message) + .setPositiveButton(android.R.string.ok, null); + } } return null; -- GitLab