[PR #5663] [MERGED] [PM-24411] Use BuildInfoManager for build-related information #5950

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/5663
Author: @SaintPatrck
Created: 8/7/2025
Status: Merged
Merged: 8/11/2025
Merged by: @SaintPatrck

Base: mainHead: remove-build-config-utils


📝 Commits (1)

  • 15feeca [PM-24411] Use BuildInfoManager for build-related information

📊 Changes

9 files changed (+93 additions, -139 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/data/platform/datasource/network/di/PlatformNetworkModule.kt (+3 -2)
app/src/main/kotlin/com/x8bit/bitwarden/data/platform/util/BuildConfigUtils.kt (+0 -73)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/about/AboutViewModel.kt (+8 -10)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsScreen.kt (+0 -5)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsViewModel.kt (+20 -3)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/about/AboutViewModelTest.kt (+11 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsScreenTest.kt (+4 -7)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsViewModelTest.kt (+47 -7)
app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/util/BuildConfigTest.kt (+0 -32)

📄 Description

🎟️ Tracking

PM-24411

📔 Objective

This commit refactors the codebase to utilize BuildInfoManager from the core module for accessing build-specific information like version, SDK, device data, and build type (dev/release, F-Droid).

Key changes:

  • Deleted BuildConfigUtils.kt as its functionality is now provided by BuildInfoManager.
  • Updated AboutViewModel to use BuildInfoManager for displaying version, SDK, device, and CI information. The logic for showing the crash logs button also now uses BuildInfoManager.isFdroid.
  • PendingRequestsViewModel now uses BuildInfoManager.isFdroid to determine if the bottom sheet should be hidden.
  • PlatformNetworkModule now injects and uses BuildInfoManager.isDevBuild to control HTTP body logging.
  • Removed isFdroid mocking and static imports from PendingRequestsScreenTest as the information is now accessed through BuildInfoManager.
  • Updated PendingRequestsScreen to use BuildInfoManager.isFdroid (via the ViewModel state) to control bottom sheet visibility.

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/5663 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 8/7/2025 **Status:** ✅ Merged **Merged:** 8/11/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `remove-build-config-utils` --- ### 📝 Commits (1) - [`15feeca`](https://github.com/bitwarden/android/commit/15feecad406187e01ac6ba28de13d17e2de81c9b) [PM-24411] Use BuildInfoManager for build-related information ### 📊 Changes **9 files changed** (+93 additions, -139 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/platform/datasource/network/di/PlatformNetworkModule.kt` (+3 -2) ➖ `app/src/main/kotlin/com/x8bit/bitwarden/data/platform/util/BuildConfigUtils.kt` (+0 -73) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/about/AboutViewModel.kt` (+8 -10) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsScreen.kt` (+0 -5) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsViewModel.kt` (+20 -3) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/about/AboutViewModelTest.kt` (+11 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsScreenTest.kt` (+4 -7) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsViewModelTest.kt` (+47 -7) ➖ `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/util/BuildConfigTest.kt` (+0 -32) </details> ### 📄 Description ## 🎟️ Tracking PM-24411 ## 📔 Objective This commit refactors the codebase to utilize `BuildInfoManager` from the core module for accessing build-specific information like version, SDK, device data, and build type (dev/release, F-Droid). Key changes: - Deleted `BuildConfigUtils.kt` as its functionality is now provided by `BuildInfoManager`. - Updated `AboutViewModel` to use `BuildInfoManager` for displaying version, SDK, device, and CI information. The logic for showing the crash logs button also now uses `BuildInfoManager.isFdroid`. - `PendingRequestsViewModel` now uses `BuildInfoManager.isFdroid` to determine if the bottom sheet should be hidden. - `PlatformNetworkModule` now injects and uses `BuildInfoManager.isDevBuild` to control HTTP body logging. - Removed `isFdroid` mocking and static imports from `PendingRequestsScreenTest` as the information is now accessed through `BuildInfoManager`. - Updated `PendingRequestsScreen` to use `BuildInfoManager.isFdroid` (via the ViewModel state) to control bottom sheet visibility. ## ⏰ 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 2025-11-27 00:17:36 -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#5950