[PR #1434] [MERGED] Fix for EMM system configuration for mobile #2887

Closed
opened 2025-11-26 23:25:31 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1434
Author: @cscharf
Created: 6/18/2021
Status: Merged
Merged: 8/11/2021
Merged by: @cscharf

Base: masterHead: fix-emm_mdm-config


📝 Commits (1)

  • f7816d7 Fix for EMM system configuration for mobile

📊 Changes

2 files changed (+5 additions, -3 deletions)

View changed files

📝 src/Android/MainActivity.cs (+3 -1)
📝 src/App/Utilities/AppHelpers.cs (+2 -2)

📄 Description

Overview

There have been some reports of the EMM / MDM configuration for centrally mobile deployments where the custom, self-hosted URL for Bitwarden needs to be pre-set in corporate distributions. This capability is supported in Xamarin and this capability was added a while back, but it would appear it isn't working (just nobody told us this or truly needed it until now).

Changes

  • MainActivity.cs - SetPreconfiguredRestrictionSettingsAsync is an async method and was being called synchronously, assigning the delegate task (unexecuted) to var setRestrictions only to be lost in the aether. Added the .GetAwaiter().GetResult() call to force synchronous execution in the synchronous context it's needed
  • AppHelpers.cs - It would seem that from the calling methods to SetPreconfiguredSettingsAsync(), the configSettings parameter generally did have values added to it, however the way the if block logic was written it would bail out of this method early if any values were provided in this case, which seems perhaps misplaced. I've not tested this theory, but this change felt right.

Reference from original PR: https://github.com/bitwarden/mobile/pull/727.


🔄 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/1434 **Author:** [@cscharf](https://github.com/cscharf) **Created:** 6/18/2021 **Status:** ✅ Merged **Merged:** 8/11/2021 **Merged by:** [@cscharf](https://github.com/cscharf) **Base:** `master` ← **Head:** `fix-emm_mdm-config` --- ### 📝 Commits (1) - [`f7816d7`](https://github.com/bitwarden/android/commit/f7816d7d7dd2dca4cc7ac6737779cff63d13917f) Fix for EMM system configuration for mobile ### 📊 Changes **2 files changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/MainActivity.cs` (+3 -1) 📝 `src/App/Utilities/AppHelpers.cs` (+2 -2) </details> ### 📄 Description ## Overview There have been some reports of the EMM / MDM configuration for centrally mobile deployments where the custom, self-hosted URL for Bitwarden needs to be pre-set in corporate distributions. This capability is supported in Xamarin and this capability was added a while back, but it would appear it isn't working (just nobody told us this or truly needed it until now). ## Changes * **MainActivity.cs** - `SetPreconfiguredRestrictionSettingsAsync` is an `async` method and was being called synchronously, assigning the delegate task (unexecuted) to `var setRestrictions` only to be lost in the aether. Added the `.GetAwaiter().GetResult()` call to force synchronous execution in the synchronous context it's needed * **AppHelpers.cs** - It would seem that from the calling methods to `SetPreconfiguredSettingsAsync()`, the `configSettings` parameter generally did have values added to it, however the way the `if` block logic was written it would bail out of this method early if any values were provided in this case, which seems perhaps misplaced. I've not tested this theory, but this change felt right. Reference from original PR: https://github.com/bitwarden/mobile/pull/727. --- <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-26 23:25:31 -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#2887