From 7f7b673b0a3e53f69b682e86120896932444acae Mon Sep 17 00:00:00 2001 From: Chad Scharf <3904944+cscharf@users.noreply.github.com> Date: Wed, 11 Aug 2021 10:36:36 -0400 Subject: [PATCH] Fix for EMM system configuration for mobile (#1434) --- src/Android/MainActivity.cs | 4 +++- src/App/Utilities/AppHelpers.cs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Android/MainActivity.cs b/src/Android/MainActivity.cs index 92fa32f41..3208295f4 100644 --- a/src/Android/MainActivity.cs +++ b/src/Android/MainActivity.cs @@ -149,7 +149,9 @@ namespace Bit.Droid } catch { } } - var setRestrictions = AndroidHelpers.SetPreconfiguredRestrictionSettingsAsync(this); + AndroidHelpers.SetPreconfiguredRestrictionSettingsAsync(this) + .GetAwaiter() + .GetResult(); } protected override void OnNewIntent(Intent intent) diff --git a/src/App/Utilities/AppHelpers.cs b/src/App/Utilities/AppHelpers.cs index ffa183e88..6d3d34606 100644 --- a/src/App/Utilities/AppHelpers.cs +++ b/src/App/Utilities/AppHelpers.cs @@ -381,7 +381,7 @@ namespace Bit.App.Utilities public static async Task SetPreconfiguredSettingsAsync(IDictionary configSettings) { - if (configSettings?.Any() ?? true) + if (configSettings?.Any() != true) { return; } @@ -403,7 +403,7 @@ namespace Bit.App.Utilities Icons = environmentService.IconsUrl }); } - break; + return; default: break; }