1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-14 23:33:34 +00:00

[PM-1249] Clear/reset password/PIN fields on login/lock screen when app is backgrounded (#2395)

* [PM-1249] Clear/reset password/PIN fields on login/lock screen when app is backgrounded

* fixes
This commit is contained in:
mp-bw
2023-03-07 11:40:22 -05:00
committed by GitHub
parent 74139627e2
commit c02cd1f15b
6 changed files with 76 additions and 2 deletions

View File

@@ -308,6 +308,7 @@ namespace Bit.App
private async Task SleptAsync()
{
await _vaultTimeoutService.CheckVaultTimeoutAsync();
await ClearSensitiveFieldsAsync();
_messagingService.Send("stopEventTimer");
}
@@ -315,6 +316,7 @@ namespace Bit.App
{
await _stateService.CheckExtensionActiveUserAndSwitchIfNeededAsync();
await _vaultTimeoutService.CheckVaultTimeoutAsync();
await ClearSensitiveFieldsAsync();
_messagingService.Send("startEventTimer");
await UpdateThemeAsync();
await ClearCacheIfNeededAsync();
@@ -335,6 +337,14 @@ namespace Bit.App
});
}
private async Task ClearSensitiveFieldsAsync()
{
await Device.InvokeOnMainThreadAsync(() =>
{
_messagingService.Send(Constants.ClearSensitiveFields);
});
}
private void SetCulture()
{
// Calendars are removed by linker. ref https://bugzilla.xamarin.com/show_bug.cgi?id=59077