[PR #6038] [MERGED] [PM-26736] Prevent logout notification on KDF change #47861

Closed
opened 2026-04-26 15:25:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6038
Author: @andrebispo5
Created: 10/16/2025
Status: Merged
Merged: 10/16/2025
Merged by: @andrebispo5

Base: mainHead: pm-26736/prevent-logout-notification


📝 Commits (3)

  • 263785e [PM-26736] Avoid emiting logout on notification with KDF change as reason.
  • 9e8d7f4 [PM-26736] Add feature flag to the logout notification changes.
  • 4b08383 [PM-26736] Add to active PM flags

📊 Changes

8 files changed (+117 additions, -4 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/PushManagerImpl.kt (+13 -2)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/di/PlatformManagerModule.kt (+2 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/model/NotificationPayload.kt (+8 -2)
app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/model/PushNotificationLogOutReason.kt (+11 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/PushManagerTest.kt (+71 -0)
📝 core/src/main/kotlin/com/bitwarden/core/data/manager/model/FlagKey.kt (+9 -0)
📝 ui/src/main/kotlin/com/bitwarden/ui/platform/components/debug/FeatureFlagListItems.kt (+2 -0)
📝 ui/src/main/res/values/strings_non_localized.xml (+1 -0)

📄 Description

🎟️ Tracking

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

📔 Objective

This pull request introduces a feature flag to control logout behavior when a push notification is received for a KDF (Key Derivation Function) change. If the new NoLogoutOnKdfChange flag is enabled, the app will avoid logging out the user when the logout reason is a KDF change.

Feature: Avoid logout on KDF change

  • Added a new feature flag NoLogoutOnKdfChange to FlagKey, including its display label and debug menu integration, allowing toggling the behavior from the UI.
  • Updated PushManagerImpl to check the new flag and skip emitting logout events if the logout reason is KDF_CHANGE in push notifications.
  • Modified dependency injection to provide FeatureFlagManager to PushManagerImpl.

📸 Screenshots

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

🔄 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/6038 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 10/16/2025 **Status:** ✅ Merged **Merged:** 10/16/2025 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `main` ← **Head:** `pm-26736/prevent-logout-notification` --- ### 📝 Commits (3) - [`263785e`](https://github.com/bitwarden/android/commit/263785e419256179183a944d78bcbdc7792df89a) [PM-26736] Avoid emiting logout on notification with KDF change as reason. - [`9e8d7f4`](https://github.com/bitwarden/android/commit/9e8d7f4211392b6706da898da827c1907b7a0326) [PM-26736] Add feature flag to the logout notification changes. - [`4b08383`](https://github.com/bitwarden/android/commit/4b08383d692a5cdaa671776af4aaa5989be061bb) [PM-26736] Add to active PM flags ### 📊 Changes **8 files changed** (+117 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/PushManagerImpl.kt` (+13 -2) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/di/PlatformManagerModule.kt` (+2 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/model/NotificationPayload.kt` (+8 -2) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/model/PushNotificationLogOutReason.kt` (+11 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/PushManagerTest.kt` (+71 -0) 📝 `core/src/main/kotlin/com/bitwarden/core/data/manager/model/FlagKey.kt` (+9 -0) 📝 `ui/src/main/kotlin/com/bitwarden/ui/platform/components/debug/FeatureFlagListItems.kt` (+2 -0) 📝 `ui/src/main/res/values/strings_non_localized.xml` (+1 -0) </details> ### 📄 Description ## 🎟️ 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-26736 ## 📔 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 introduces a feature flag to control logout behavior when a push notification is received for a KDF (Key Derivation Function) change. If the new `NoLogoutOnKdfChange` flag is enabled, the app will avoid logging out the user when the logout reason is a KDF change. Feature: Avoid logout on KDF change * Added a new feature flag `NoLogoutOnKdfChange` to `FlagKey`, including its display label and debug menu integration, allowing toggling the behavior from the UI. * Updated `PushManagerImpl` to check the new flag and skip emitting logout events if the logout reason is `KDF_CHANGE` in push notifications. * Modified dependency injection to provide `FeatureFlagManager` to `PushManagerImpl`. ## 📸 Screenshots <!-- 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 - 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 --- <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-04-26 15:25:05 -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#47861