[PR #1775] [MERGED] Fix for vault timeout not firing on resume #60383

Closed
opened 2026-05-11 23:31:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1775
Author: @mpbw2
Created: 2/13/2022
Status: ✅ Merged
Merged: 2/14/2022
Merged by: @mpbw2

Base: master ← Head: bugfix-vault-timeout


📝 Commits (2)

  • c2f72c4 fix for vault timeout not firing on resume
  • 9a3cd4c call ResumedAsync with FireAndForget

📊 Changes

1 file changed (+4 additions, -5 deletions)

View changed files

📝 src/App/App.xaml.cs (+4 -5)

📄 Description

Type of change

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

Objective

Fix for vault timeout not firing on app resume in most recent release. Closes #1772

Code changes

  • App.xaml.cs: The recent change to make UpdateTheme async resulted in a race condition which allowed BaseContentPage.SaveActivity() to execute prior to VaultTimeoutService.CheckVaultTimeoutAsync(). This resulted in the LastActiveTime value being reset before it could be compared to the current time, making the app think only a few milliseconds had passed regardless of how long it was in the background. By checking vault timeout before executing the improved theme update process, we're able to establish the correct elapsed time again. @fedemkr Let me know if you see any issues with this interfering with the theme updater.

Testing requirements

Vault timeout should function as expected again.

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/1775 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 2/13/2022 **Status:** ✅ Merged **Merged:** 2/14/2022 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `master` ← **Head:** `bugfix-vault-timeout` --- ### 📝 Commits (2) - [`c2f72c4`](https://github.com/bitwarden/android/commit/c2f72c4b41b9234bc5f4e1c6b7650bd1227f7e22) fix for vault timeout not firing on resume - [`9a3cd4c`](https://github.com/bitwarden/android/commit/9a3cd4cafd5fe465abfdb958aea532e2522b324f) call ResumedAsync with FireAndForget ### 📊 Changes **1 file changed** (+4 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/App/App.xaml.cs` (+4 -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--> Fix for vault timeout not firing on app resume in most recent release. Closes #1772 ## 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--> * **App.xaml.cs:** The [recent change](https://github.com/bitwarden/mobile/pull/1707) to make `UpdateTheme` async resulted in a race condition which allowed `BaseContentPage.SaveActivity()` to execute prior to `VaultTimeoutService.CheckVaultTimeoutAsync()`. This resulted in the `LastActiveTime` value being reset before it could be compared to the current time, making the app think only a few milliseconds had passed regardless of how long it was in the background. By checking vault timeout before executing the improved theme update process, we're able to establish the correct elapsed time again. @fedemkr Let me know if you see any issues with this interfering with the theme updater. ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> Vault timeout should function as expected again. ## 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 2026-05-11 23:31:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#60383