1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-13 23:03:23 +00:00

Accessibility service setup pages

This commit is contained in:
Kyle Spearrin
2017-02-01 00:38:35 -05:00
parent ea1aafbab2
commit 27fb44277f
12 changed files with 448 additions and 196 deletions

View File

@@ -24,6 +24,8 @@ namespace Bit.Android
private const string BitwardenPackage = "com.x8bit.bitwarden";
private const string BitwardenWebsite = "bitwarden.com";
public static bool Enabled { get; set; } = false;
public override void OnAccessibilityEvent(AccessibilityEvent e)
{
var eventType = e.EventType;
@@ -80,6 +82,18 @@ namespace Bit.Android
}
protected override void OnServiceConnected()
{
base.OnServiceConnected();
Enabled = true;
}
public override void OnDestroy()
{
base.OnDestroy();
Enabled = false;
}
private void CancelNotification()
{
var notificationManager = ((NotificationManager)GetSystemService(NotificationService));
@@ -176,9 +190,9 @@ namespace Bit.Android
var builder = new Notification.Builder(this);
builder.SetSmallIcon(Resource.Drawable.notification_sm)
.SetContentTitle("bitwarden Autofill Service")
.SetContentText("Tap this notification to autofill a login from your vault.")
.SetTicker("Tap this notification to autofill a login from your vault.")
.SetContentTitle(App.Resources.AppResources.BitwardenAutofillService)
.SetContentText(App.Resources.AppResources.BitwardenAutofillServiceNotificationContent)
.SetTicker(App.Resources.AppResources.BitwardenAutofillServiceNotificationContent)
.SetWhen(Java.Lang.JavaSystem.CurrentTimeMillis())
.SetContentIntent(pendingIntent);