[PR #3047] [MERGED] [PM-6552] Fix for App only showing Home (Login) Page after closed after opening Accessibility Settings #83827

Closed
opened 2026-05-22 18:14:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3047
Author: @dinisvieira
Created: 3/1/2024
Status: Merged
Merged: 3/1/2024
Merged by: @dinisvieira

Base: mainHead: feature/PM-6552-fix-for-accessibility-settings-home-bug


📝 Commits (1)

  • a5413d7 PM-6552 Fix for App only showing Home (Login) Page after closed after opening Accessibility Settings

📊 Changes

2 files changed (+19 additions, -0 deletions)

View changed files

📝 src/Core/App.xaml.cs (+14 -0)
📝 src/Core/Pages/Settings/AutofillSettingsPageViewModel.android.cs (+5 -0)

📄 Description

Type of change

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

Objective

The app is showing the Home Login page when we open the Accessibility Settings on Android from the App and then close the bitwarden app.
This is due to the Accessibility Service being kept alive (and therefore App.xaml.cs). When we open the app again it doesn't try to Navigate to the proper page because of that.
We need to have the app navigate normally even in these scenarios.

Code changes

A workaround similar to the existing one for Autofill can be implemented. It's done separately with a different variable so that the app can handle edge cases where both are needed simultaneously.

  • App.xaml.cs: Added a workaround block similar to the existing one for Autofill. This will basically allow executing Navigations if HasNavigatedToAccessibilitySettings is set to true.
  • AutofillSettingsPageViewModel.android.cs: This is where we set the HasNavigatedToAccessibilitySettings to true so that the next time CreateWindow executes it can set the app to also execute Navigation afterward. Also added #if ANDROID to avoid compile time error.

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If 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/3047 **Author:** [@dinisvieira](https://github.com/dinisvieira) **Created:** 3/1/2024 **Status:** ✅ Merged **Merged:** 3/1/2024 **Merged by:** [@dinisvieira](https://github.com/dinisvieira) **Base:** `main` ← **Head:** `feature/PM-6552-fix-for-accessibility-settings-home-bug` --- ### 📝 Commits (1) - [`a5413d7`](https://github.com/bitwarden/android/commit/a5413d76a10436da9f490e21b0f61e8a8d33eb5e) PM-6552 Fix for App only showing Home (Login) Page after closed after opening Accessibility Settings ### 📊 Changes **2 files changed** (+19 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/App.xaml.cs` (+14 -0) 📝 `src/Core/Pages/Settings/AutofillSettingsPageViewModel.android.cs` (+5 -0) </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 The app is showing the Home Login page when we open the Accessibility Settings on Android from the App and then close the bitwarden app. This is due to the Accessibility Service being kept alive (and therefore `App.xaml.cs`). When we open the app again it doesn't try to Navigate to the proper page because of that. We need to have the app navigate normally even in these scenarios. ## Code changes A workaround similar to the existing one for Autofill can be implemented. It's done separately with a different variable so that the app can handle edge cases where both are needed simultaneously. * **App.xaml.cs:** Added a workaround block similar to the existing one for Autofill. This will basically allow executing Navigations if `HasNavigatedToAccessibilitySettings` is set to true. * **AutofillSettingsPageViewModel.android.cs:** This is where we set the `HasNavigatedToAccessibilitySettings` to true so that the next time CreateWindow executes it can set the app to also execute Navigation afterward. Also added `#if ANDROID` to avoid compile time error. ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If 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-22 18:14:35 -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#83827