[PR #5872] [MERGED] [PM-25664] Add CredentialExchangeImportManager for CXF payload import #25489

Closed
opened 2026-04-17 01:10:36 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/5872
Author: @SaintPatrck
Created: 9/11/2025
Status: Merged
Merged: 9/16/2025
Merged by: @SaintPatrck

Base: mainHead: cxf/app/cx-import-manager


📝 Commits (2)

  • ebfdeb0 [PM-25664] Add CredentialExchangeImportManager
  • f220f77 [PM-25664] Add CredentialExchangeImportManager

📊 Changes

11 files changed (+442 additions, -27 deletions)

View changed files

📝 app/build.gradle.kts (+3 -1)
app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManager.kt (+20 -0)
app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerImpl.kt (+64 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/di/VaultManagerModule.kt (+12 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/model/ImportCxfPayloadResult.kt (+7 -4)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepository.kt (+2 -2)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryImpl.kt (+31 -9)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/di/VaultRepositoryModule.kt (+3 -0)
app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/model/ImportCredentialsResult.kt (+30 -0)
app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerTest.kt (+186 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt (+84 -11)

📄 Description

🎟️ Tracking

PM-25664

📔 Objective

This change introduces a CredentialExchangeImportManager to handle the logic for importing CXF payloads. The VaultRepositoryImpl now delegates CXF import operations to this new manager.

Key changes:

  • Created CredentialExchangeImportManager interface and its implementation CredentialExchangeImportManagerImpl.
  • CredentialExchangeImportManagerImpl now handles the direct interaction with VaultSdkSource for CXF import and CiphersService for uploading ciphers.
  • VaultRepositoryImpl.importCxfPayload now uses CredentialExchangeImportManager and syncs the vault after a successful import.
  • Renamed ImportCxfPayloadResult (repository model) to ImportCxfPayloadResult (manager model) and updated its structure.
  • Introduced a new ImportCredentialsResult sealed class in the repository model to represent the outcome of the import and subsequent sync.
  • Added corresponding tests for CredentialExchangeImportManagerImpl.
  • Updated VaultRepositoryTest to reflect the changes in import logic and result types.
  • Included necessary dependencies for AndroidX Credentials.

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/5872 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 9/11/2025 **Status:** ✅ Merged **Merged:** 9/16/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `cxf/app/cx-import-manager` --- ### 📝 Commits (2) - [`ebfdeb0`](https://github.com/bitwarden/android/commit/ebfdeb095578b0c836bada366233457091f0c010) [PM-25664] Add CredentialExchangeImportManager - [`f220f77`](https://github.com/bitwarden/android/commit/f220f77d9bda8a36b4cac5883336d01b8861aab7) [PM-25664] Add CredentialExchangeImportManager ### 📊 Changes **11 files changed** (+442 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `app/build.gradle.kts` (+3 -1) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManager.kt` (+20 -0) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerImpl.kt` (+64 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/di/VaultManagerModule.kt` (+12 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/model/ImportCxfPayloadResult.kt` (+7 -4) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepository.kt` (+2 -2) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryImpl.kt` (+31 -9) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/di/VaultRepositoryModule.kt` (+3 -0) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/model/ImportCredentialsResult.kt` (+30 -0) ➕ `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerTest.kt` (+186 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt` (+84 -11) </details> ### 📄 Description ## 🎟️ Tracking PM-25664 ## 📔 Objective This change introduces a `CredentialExchangeImportManager` to handle the logic for importing CXF payloads. The `VaultRepositoryImpl` now delegates CXF import operations to this new manager. Key changes: - Created `CredentialExchangeImportManager` interface and its implementation `CredentialExchangeImportManagerImpl`. - `CredentialExchangeImportManagerImpl` now handles the direct interaction with `VaultSdkSource` for CXF import and `CiphersService` for uploading ciphers. - `VaultRepositoryImpl.importCxfPayload` now uses `CredentialExchangeImportManager` and syncs the vault after a successful import. - Renamed `ImportCxfPayloadResult` (repository model) to `ImportCxfPayloadResult` (manager model) and updated its structure. - Introduced a new `ImportCredentialsResult` sealed class in the repository model to represent the outcome of the import and subsequent sync. - Added corresponding tests for `CredentialExchangeImportManagerImpl`. - Updated `VaultRepositoryTest` to reflect the changes in import logic and result types. - Included necessary dependencies for AndroidX Credentials. ## ⏰ 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-17 01:10:36 -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#25489