1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 15:53:44 +00:00

implement blacklisted uris options for autofill

This commit is contained in:
Kyle Spearrin
2019-06-03 11:08:33 -04:00
parent 999c9667c8
commit e8c776fe49
2 changed files with 25 additions and 4 deletions

View File

@@ -24,7 +24,8 @@ namespace Bit.Droid.Autofill
private ILockService _lockService;
private IStorageService _storageService;
public async override void OnFillRequest(FillRequest request, CancellationSignal cancellationSignal, FillCallback callback)
public async override void OnFillRequest(FillRequest request, CancellationSignal cancellationSignal,
FillCallback callback)
{
var structure = request.FillContexts?.LastOrDefault()?.Structure;
if(structure == null)
@@ -35,7 +36,13 @@ namespace Bit.Droid.Autofill
var parser = new Parser(structure, ApplicationContext);
parser.Parse();
if(!parser.ShouldAutofill)
if(_storageService == null)
{
_storageService = ServiceContainer.Resolve<IStorageService>("storageService");
}
var shouldAutofill = await parser.ShouldAutofillAsync(_storageService);
if(!shouldAutofill)
{
return;
}