[PR #1682] [MERGED] Fix Progress dialog crash on tombstoning #3053

Closed
opened 2025-11-26 23:27:42 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1682
Author: @fedemkr
Created: 12/10/2021
Status: Merged
Merged: 1/21/2022
Merged by: @vvolkgang

Base: masterHead: bug/fix-progress-dialog-crash-on-tombstone


📝 Commits (4)

  • c9c5771 Changed ProgressDialog because deprecated and improved the dismissal of the dialog in order for it not to crash the app on certain situations
  • 4a87f25 Merge branch 'master' into bug/fix-progress-dialog-crash-on-tombstone
  • 9f6d326 Merge branch 'master' into bug/fix-progress-dialog-crash-on-tombstone
  • 18ad727 Removed android version check given that our minimum is greater that the check

📊 Changes

5 files changed (+146 additions, -15 deletions)

View changed files

📝 src/Android/Android.csproj (+1 -0)
src/Android/Resources/layout/progress_dialog_layout.xml (+27 -0)
📝 src/Android/Services/DeviceActionService.cs (+93 -10)
📝 src/Android/Utilities/ThemeHelpers.cs (+4 -0)
📝 src/App/Pages/Vault/AddEditPageViewModel.cs (+21 -5)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Android: Fix crash produced by the Progress dialog on tombstoning and also to change it because it was deprecated for the new way.

Code changes

  • DeviceActionService.cs: Changed ProgressDialog for AlertDialog with a custom layout for the progress and improved the HideLoadingAsync to take care of more situations so that the dismissal is done correctly and doesn't crash the app
  • AddEditPageViewModel.cs: Added a check before popping the modal because it could lead to a crash on tombstoning

Testing requirements

Check that the UI of the loading hasn't been affected dramatically, check that the loading is done correctly in different screens, e.g. logging in or saving a cypher.
Also test that while loading (without letting the loading finish) tombstone the app (a simpler way, but not the same, is to set Don't keep activities in Developer options of the settings of the phone before opening the app) and then go back to the app and check that it doesn't crash.

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/1682 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 12/10/2021 **Status:** ✅ Merged **Merged:** 1/21/2022 **Merged by:** [@vvolkgang](https://github.com/vvolkgang) **Base:** `master` ← **Head:** `bug/fix-progress-dialog-crash-on-tombstone` --- ### 📝 Commits (4) - [`c9c5771`](https://github.com/bitwarden/android/commit/c9c5771d12199039e47d74a35af2af2ea1fd38c8) Changed ProgressDialog because deprecated and improved the dismissal of the dialog in order for it not to crash the app on certain situations - [`4a87f25`](https://github.com/bitwarden/android/commit/4a87f258ee8ef6312c38cbcd86078c97c71d5a88) Merge branch 'master' into bug/fix-progress-dialog-crash-on-tombstone - [`9f6d326`](https://github.com/bitwarden/android/commit/9f6d3269f9d08bdfd5cab0e3b9a208c426541b32) Merge branch 'master' into bug/fix-progress-dialog-crash-on-tombstone - [`18ad727`](https://github.com/bitwarden/android/commit/18ad7276150265306bbc82e96d3130d9a3c53915) Removed android version check given that our minimum is greater that the check ### 📊 Changes **5 files changed** (+146 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/Android.csproj` (+1 -0) ➕ `src/Android/Resources/layout/progress_dialog_layout.xml` (+27 -0) 📝 `src/Android/Services/DeviceActionService.cs` (+93 -10) 📝 `src/Android/Utilities/ThemeHelpers.cs` (+4 -0) 📝 `src/App/Pages/Vault/AddEditPageViewModel.cs` (+21 -5) </details> ### 📄 Description ## Type of change - [X] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Android: Fix crash produced by the Progress dialog on tombstoning and also to change it because it was deprecated for the new way. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **DeviceActionService.cs:** Changed `ProgressDialog` for `AlertDialog` with a custom layout for the progress and improved the `HideLoadingAsync` to take care of more situations so that the dismissal is done correctly and doesn't crash the app * **AddEditPageViewModel.cs:** Added a check before popping the modal because it could lead to a crash on tombstoning ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> Check that the UI of the loading hasn't been affected dramatically, check that the loading is done correctly in different screens, e.g. logging in or saving a cypher. Also test that while loading (without letting the loading finish) tombstone the app (a simpler way, but not the same, is to set `Don't keep activities` in Developer options of the settings of the phone before opening the app) and then go back to the app and check that it doesn't crash. ## Before you submit - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [ ] This change has particular **deployment requirements** (notify the DevOps team) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:27:42 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3053