diff --git a/src/Android/Autofill/AutofillHelpers.cs b/src/Android/Autofill/AutofillHelpers.cs index bc539bbc1..f9f30cd45 100644 --- a/src/Android/Autofill/AutofillHelpers.cs +++ b/src/Android/Autofill/AutofillHelpers.cs @@ -165,7 +165,7 @@ namespace Bit.Droid.Autofill { var packageName = context.PackageName; var view = new RemoteViews(packageName, Resource.Layout.autofill_listitem); - view.SetTextViewText(Resource.Id.text, text); + view.SetTextViewText(Resource.Id.text1, text); view.SetTextViewText(Resource.Id.text2, subtext); view.SetImageViewResource(Resource.Id.icon, iconId); return view; diff --git a/src/Android/Autofill/AutofillService.cs b/src/Android/Autofill/AutofillService.cs index 38341ed3e..90e8009b6 100644 --- a/src/Android/Autofill/AutofillService.cs +++ b/src/Android/Autofill/AutofillService.cs @@ -21,7 +21,7 @@ namespace Bit.Droid.Autofill public class AutofillService : Android.Service.Autofill.AutofillService { private ICipherService _cipherService; - //private ILockService _lockService; + private ILockService _lockService; public async override void OnFillRequest(FillRequest request, CancellationSignal cancellationSignal, FillCallback callback) { @@ -38,16 +38,14 @@ namespace Bit.Droid.Autofill { return; } - - /* + if(_lockService == null) { _lockService = ServiceContainer.Resolve("lockService"); } - */ List items = null; - var locked = true; // TODO + var locked = await _lockService.IsLockedAsync(); if(!locked) { if(_cipherService == null) diff --git a/src/Android/Services/DeviceActionService.cs b/src/Android/Services/DeviceActionService.cs index dd71f6f59..5e860f3c4 100644 --- a/src/Android/Services/DeviceActionService.cs +++ b/src/Android/Services/DeviceActionService.cs @@ -417,8 +417,8 @@ namespace Bit.Droid.Services activity.Finish(); return; } - var structure = activity.Intent - .GetParcelableExtra(AutofillManager.ExtraAssistStructure) as AssistStructure; + var structure = activity.Intent.GetParcelableExtra( + AutofillManager.ExtraAssistStructure) as AssistStructure; if(structure == null) { activity.SetResult(Result.Canceled); @@ -433,6 +433,7 @@ namespace Bit.Droid.Services activity.Finish(); return; } + var task = CopyTotpAsync(cipher); var dataset = AutofillHelpers.BuildDataset(activity, parser.FieldCollection, new FilledItem(cipher)); var replyIntent = new Intent(); replyIntent.PutExtra(AutofillManager.ExtraAuthenticationResult, dataset);