diff --git a/src/Android/Accessibility/AccessibilityHelpers.cs b/src/Android/Accessibility/AccessibilityHelpers.cs index 9a6591eca..319733ce8 100644 --- a/src/Android/Accessibility/AccessibilityHelpers.cs +++ b/src/Android/Accessibility/AccessibilityHelpers.cs @@ -114,6 +114,12 @@ namespace Bit.Droid.Accessibility uri = ExtractUri(uri, addressNode, browser); addressNode.Dispose(); } + else + { + // Return null to prevent overwriting notification pendingIntent uri with browser packageName + // (we login to pages, not browsers) + return null; + } } return uri; } diff --git a/src/Android/Accessibility/AccessibilityService.cs b/src/Android/Accessibility/AccessibilityService.cs index 3af298bf7..f554a3afe 100644 --- a/src/Android/Accessibility/AccessibilityService.cs +++ b/src/Android/Accessibility/AccessibilityService.cs @@ -100,11 +100,11 @@ namespace Bit.Droid.Accessibility break; } var uri = AccessibilityHelpers.GetUri(root); - if(uri != _lastNotificationUri) + if(uri != null && uri != _lastNotificationUri) { CancelNotification(notificationManager); } - else if(uri.StartsWith(Constants.AndroidAppProtocol)) + else if(uri != null && uri.StartsWith(Constants.AndroidAppProtocol)) { CancelNotification(notificationManager, 30000); }