Merge pull request #14093 from Simonx22/android/fix-system-update-dialog-dismissal

Android: Prevent dismissing the System Update dialog by tapping outside
This commit is contained in:
OatmealDome 2025-11-09 17:08:43 -05:00 committed by GitHub
commit fdf822f430
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,6 +21,7 @@ class SystemUpdateProgressBarDialogFragment : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
viewModel = ViewModelProvider(requireActivity())[SystemUpdateViewModel::class.java]
isCancelable = false
// We need to set the message to something here, otherwise the text will not appear when we set it later.
val progressDialogBuilder = MaterialAlertDialogBuilder(requireContext())
@ -65,6 +66,7 @@ class SystemUpdateProgressBarDialogFragment : DialogFragment() {
}
val progressDialog = progressDialogBuilder.create()
progressDialog.setCanceledOnTouchOutside(false)
viewModel.titleIdData.observe(this) { titleId: Long ->
progressDialog.setMessage(getString(R.string.updating_message, titleId))