mirror of
https://github.com/bitwarden/android.git
synced 2025-01-09 01:37:33 +03:00
36 lines
923 B
C#
36 lines
923 B
C#
|
using Bit.App.Abstractions;
|
|||
|
using Bit.App.Resources;
|
|||
|
using Bit.Core.Utilities;
|
|||
|
|
|||
|
namespace Bit.App.Pages
|
|||
|
{
|
|||
|
public class AccessibilityServicePageViewModel : BaseViewModel
|
|||
|
{
|
|||
|
private readonly IDeviceActionService _deviceActionService;
|
|||
|
|
|||
|
private bool _enabled;
|
|||
|
|
|||
|
public AccessibilityServicePageViewModel()
|
|||
|
{
|
|||
|
_deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService");
|
|||
|
PageTitle = AppResources.AutofillAccessibilityService;
|
|||
|
}
|
|||
|
|
|||
|
public bool Enabled
|
|||
|
{
|
|||
|
get => _enabled;
|
|||
|
set => SetProperty(ref _enabled, value);
|
|||
|
}
|
|||
|
|
|||
|
public void OpenSettings()
|
|||
|
{
|
|||
|
_deviceActionService.OpenAccessibilitySettings();
|
|||
|
}
|
|||
|
|
|||
|
public void UpdateEnabled()
|
|||
|
{
|
|||
|
Enabled = _deviceActionService.AutofillAccessibilityServiceRunning();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|