From 84a6ee8cbf21bea3606478c3ee6ba9e902ac7393 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 30 May 2017 08:35:57 -0400 Subject: [PATCH] autofill fixes for password focus --- src/Android/AutofillService.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Android/AutofillService.cs b/src/Android/AutofillService.cs index 47ef24f55..5b954415f 100644 --- a/src/Android/AutofillService.cs +++ b/src/Android/AutofillService.cs @@ -121,8 +121,13 @@ namespace Bit.Android if(uri != _lastNotificationUri) { CancelNotification(notificationManager); - break; } + else if(uri.StartsWith(App.Constants.AndroidAppProtocol)) + { + CancelNotification(notificationManager, 60000); + } + + break; } if(e.PackageName == BitwardenPackage) @@ -220,9 +225,9 @@ namespace Bit.Android return cancelNotification; } - public void CancelNotification(NotificationManager notificationManager) + public void CancelNotification(NotificationManager notificationManager, long limit = 250) { - if(Java.Lang.JavaSystem.CurrentTimeMillis() - _lastNotificationTime < 250) + if(Java.Lang.JavaSystem.CurrentTimeMillis() - _lastNotificationTime < limit) { return; }