[PR #4498] [MERGED] PM-16062 Prevent account locks for ongoing autofill requests #4996

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/4498
Author: @dseverns-livefront
Created: 12/20/2024
Status: Merged
Merged: 12/20/2024
Merged by: @dseverns-livefront

Base: mainHead: PM-16062-vault-locking-each-time-autofill-starts


📝 Commits (5)

  • 5500f92 PM-16062 prevent account lock when new activity is created specifically for autofill and update restart timeout to look at app created events
  • 1f583de update docs
  • 40dc0e9 parameter name
  • 1373951 pr feedback: formatting, docs, and making sure timer is cancelled when app is foregrounded
  • ea6f0d6 feedback, fmting, attempting to rightsize tests

📊 Changes

7 files changed (+204 additions, -152 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/data/autofill/util/AutofillIntentUtils.kt (+10 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/manager/AppStateManagerImpl.kt (+7 -3)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/manager/model/AppCreationState.kt (+5 -3)
📝 app/src/main/java/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerImpl.kt (+71 -40)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/manager/AppStateManagerTest.kt (+9 -3)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/manager/util/FakeAppStateManager.kt (+2 -1)
📝 app/src/test/java/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt (+100 -102)

📄 Description

🎟️ Tracking

PM-16062

📔 Objective

  • When the app was being opened by the AutoFill/Accessibility services from a cold start, the user would need to unlock the vault, and once completing the AutoFill request the vault was being locked based on the state being send to the VaultLockManager.
  • This was especially called out for logins that have a (2 page) flow, where the user was being asked to unlock the vault again to grab the password on the second page.
  • This change changes the VaultLockManager to check the timeout action instead on events of the activity being created for the first time with the added context of if was created for Autofill purposes.

📸 Screenshots

https://github.com/user-attachments/assets/982edd38-2aea-4e76-94c9-1f73d70f1277

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 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/4498 **Author:** [@dseverns-livefront](https://github.com/dseverns-livefront) **Created:** 12/20/2024 **Status:** ✅ Merged **Merged:** 12/20/2024 **Merged by:** [@dseverns-livefront](https://github.com/dseverns-livefront) **Base:** `main` ← **Head:** `PM-16062-vault-locking-each-time-autofill-starts` --- ### 📝 Commits (5) - [`5500f92`](https://github.com/bitwarden/android/commit/5500f92a912d0771fabd48123a0b76c206564e15) PM-16062 prevent account lock when new activity is created specifically for autofill and update restart timeout to look at app created events - [`1f583de`](https://github.com/bitwarden/android/commit/1f583de111ebb67a0b73e32a2c83e3a73f1f67d5) update docs - [`40dc0e9`](https://github.com/bitwarden/android/commit/40dc0e9386ca78f288a16dcc4ef5cabed42b26fc) parameter name - [`1373951`](https://github.com/bitwarden/android/commit/1373951a6b6624570ff9b7c9979f3690f1e33814) pr feedback: formatting, docs, and making sure timer is cancelled when app is foregrounded - [`ea6f0d6`](https://github.com/bitwarden/android/commit/ea6f0d6cab2abbffaeb58059ae25150e91c771db) feedback, fmting, attempting to rightsize tests ### 📊 Changes **7 files changed** (+204 additions, -152 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/data/autofill/util/AutofillIntentUtils.kt` (+10 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/manager/AppStateManagerImpl.kt` (+7 -3) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/manager/model/AppCreationState.kt` (+5 -3) 📝 `app/src/main/java/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerImpl.kt` (+71 -40) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/manager/AppStateManagerTest.kt` (+9 -3) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/manager/util/FakeAppStateManager.kt` (+2 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt` (+100 -102) </details> ### 📄 Description ## 🎟️ Tracking [PM-16062](https://bitwarden.atlassian.net/browse/PM-16062) <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> ## 📔 Objective - When the app was being opened by the AutoFill/Accessibility services from a cold start, the user would need to unlock the vault, and once completing the AutoFill request the vault was being locked based on the state being send to the `VaultLockManager`. - This was especially called out for logins that have a (2 page) flow, where the user was being asked to unlock the vault again to grab the password on the second page. - This change changes the `VaultLockManager` to check the timeout action instead on events of the activity being created for the first time with the added context of if was created for Autofill purposes. ## 📸 Screenshots https://github.com/user-attachments/assets/982edd38-2aea-4e76-94c9-1f73d70f1277 <!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. --> ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes [PM-16062]: https://bitwarden.atlassian.net/browse/PM-16062?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- <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:52:37 -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#4996