1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-27 21:53:57 +00:00

log autofill events

This commit is contained in:
Kyle Spearrin
2019-07-22 15:50:59 -04:00
parent 0c75374c0f
commit f9547f158e
10 changed files with 33 additions and 20 deletions

View File

@@ -36,6 +36,7 @@ namespace Bit.Droid.Services
private readonly IStorageService _storageService;
private readonly IMessagingService _messagingService;
private readonly IBroadcasterService _broadcasterService;
private readonly IEventService _eventService;
private ProgressDialog _progressDialog;
private bool _cameraPermissionsDenied;
private Toast _toast;
@@ -43,11 +44,13 @@ namespace Bit.Droid.Services
public DeviceActionService(
IStorageService storageService,
IMessagingService messagingService,
IBroadcasterService broadcasterService)
IBroadcasterService broadcasterService,
IEventService eventService)
{
_storageService = storageService;
_messagingService = messagingService;
_broadcasterService = broadcasterService;
_eventService = eventService;
_broadcasterService.Subscribe(nameof(DeviceActionService), (message) =>
{
@@ -463,6 +466,7 @@ namespace Bit.Droid.Services
replyIntent.PutExtra(AutofillManager.ExtraAuthenticationResult, dataset);
activity.SetResult(Result.Ok, replyIntent);
activity.Finish();
var eventTask = _eventService.CollectAsync(EventType.Cipher_ClientAutofilled, cipher.Id);
}
else
{
@@ -488,6 +492,7 @@ namespace Bit.Droid.Services
}
activity.Finish();
_messagingService.Send("finishMainActivity");
var eventTask = _eventService.CollectAsync(EventType.Cipher_ClientAutofilled, cipher.Id);
}
}