diff --git a/src/Android/Services/DeviceActionService.cs b/src/Android/Services/DeviceActionService.cs index a8b37e62b..961c22a48 100644 --- a/src/Android/Services/DeviceActionService.cs +++ b/src/Android/Services/DeviceActionService.cs @@ -302,9 +302,9 @@ namespace Bit.Android.Services public void DismissKeyboard() { - var activity = (MainActivity)CurrentContext; try { + var activity = (MainActivity)CurrentContext; var imm = (InputMethodManager)activity.GetSystemService(Context.InputMethodService); imm.HideSoftInputFromWindow(activity.CurrentFocus.WindowToken, 0); } diff --git a/src/App/Pages/Lock/LockFingerprintPage.cs b/src/App/Pages/Lock/LockFingerprintPage.cs index c3ed2c6d5..701b57d93 100644 --- a/src/App/Pages/Lock/LockFingerprintPage.cs +++ b/src/App/Pages/Lock/LockFingerprintPage.cs @@ -38,7 +38,7 @@ namespace Bit.App.Pages Android: "fingerprint.png", Windows: "smile.png"); var biometricText = Helpers.OnPlatform( - iOS: _deviceInfoService.HasFaceIdSupport ? + iOS: _deviceInfoService.HasFaceIdSupport ? AppResources.UseFaceIDToUnlock : AppResources.UseFingerprintToUnlock, Android: AppResources.UseFingerprintToUnlock, Windows: AppResources.UseWindowsHelloToUnlock); @@ -87,13 +87,14 @@ namespace Bit.App.Pages Content = stackLayout; } - protected override void OnAppearing() + protected override async void OnAppearing() { base.OnAppearing(); if(_checkFingerprintImmediately) { - var task = CheckFingerprintAsync(); + await Task.Delay(Device.RuntimePlatform == Device.Android ? 500 : 200); + await CheckFingerprintAsync(); } } @@ -105,7 +106,7 @@ namespace Bit.App.Pages } _lastAction = DateTime.UtcNow; - var direction = _deviceInfoService.HasFaceIdSupport ? + var direction = _deviceInfoService.HasFaceIdSupport ? AppResources.FaceIDDirection : AppResources.FingerprintDirection; var fingerprintRequest = new AuthenticationRequestConfiguration(direction) diff --git a/src/App/Pages/Lock/LockPasswordPage.cs b/src/App/Pages/Lock/LockPasswordPage.cs index 8e7d6b3bc..bbbe1b175 100644 --- a/src/App/Pages/Lock/LockPasswordPage.cs +++ b/src/App/Pages/Lock/LockPasswordPage.cs @@ -93,9 +93,9 @@ namespace Bit.App.Pages Content = scrollView; } - private void Entry_Completed(object sender, EventArgs e) + private async void Entry_Completed(object sender, EventArgs e) { - var task = CheckPasswordAsync(); + await CheckPasswordAsync(); } protected override void OnAppearing()