[PR #6103] [PM-27150] React to device changes on device screen unlock method #6319

Closed
opened 2025-11-27 00:22:17 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/bitwarden/android/pull/6103

State: closed
Merged: Yes


🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-27150

📔 Objective

This pull request improves how the Authenticator app handles biometric authentication, especially in scenarios where the device's biometric setup changes (e.g., biometrics are disabled or removed). The main focus is on ensuring that the app responds appropriately if biometrics are no longer available, both in navigation logic and in the settings UI.

Biometric Authentication Handling Improvements:

  • The app now checks if biometrics are supported before navigating to the unlock screen; if not, it triggers a new action to clear the biometric key and unlocks the app instead.
  • Added the ClearBiometricsKey action to RootNavAction.Internal, with corresponding handling in RootNavViewModel to clear the key and update navigation state.

Settings Screen Enhancements:

  • The settings screen now rechecks biometric support whenever the app resumes (comes to the foreground), disabling biometric unlock in the app if biometrics are no longer supported on the device.
  • The conditional rendering of the "Unlock with Biometrics" row is now based on a state variable that updates with lifecycle events, ensuring the UI reflects the current device biometric status.

Dependency Injection and Imports:

  • BiometricsManager is now injected into RootNavScreen using LocalBiometricsManager, and necessary imports have been added to support these changes.

📸 Screenshots

https://github.com/user-attachments/assets/f41d9899-d05d-40a7-a142-0e614d059f12

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) 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
**Original Pull Request:** https://github.com/bitwarden/android/pull/6103 **State:** closed **Merged:** Yes --- ## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> https://bitwarden.atlassian.net/browse/PM-27150 ## 📔 Objective <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> This pull request improves how the Authenticator app handles biometric authentication, especially in scenarios where the device's biometric setup changes (e.g., biometrics are disabled or removed). The main focus is on ensuring that the app responds appropriately if biometrics are no longer available, both in navigation logic and in the settings UI. **Biometric Authentication Handling Improvements:** * The app now checks if biometrics are supported before navigating to the unlock screen; if not, it triggers a new action to clear the biometric key and unlocks the app instead. * Added the `ClearBiometricsKey` action to `RootNavAction.Internal`, with corresponding handling in `RootNavViewModel` to clear the key and update navigation state. **Settings Screen Enhancements:** * The settings screen now rechecks biometric support whenever the app resumes (comes to the foreground), disabling biometric unlock in the app if biometrics are no longer supported on the device. * The conditional rendering of the "Unlock with Biometrics" row is now based on a state variable that updates with lifecycle events, ensuring the UI reflects the current device biometric status. **Dependency Injection and Imports:** * `BiometricsManager` is now injected into `RootNavScreen` using `LocalBiometricsManager`, and necessary imports have been added to support these changes. ## 📸 Screenshots <!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. --> https://github.com/user-attachments/assets/f41d9899-d05d-40a7-a142-0e614d059f12 ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) 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
GiteaMirror added the pull-request label 2025-11-27 00:22:17 -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#6319