package com.jens.automation2;

import android.accessibilityservice.AccessibilityService;
import android.os.Build;
import android.util.Log;
import android.view.Display;
import android.view.accessibility.AccessibilityEvent;

import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;

public class MyAccessibilityService extends AccessibilityService
{
    static MyAccessibilityService instance;

    public static MyAccessibilityService getInstance()
    {
        if(instance == null)
        {
            instance = new MyAccessibilityService();
        }

        return instance;
    }

    @Override
    public void onAccessibilityEvent(AccessibilityEvent accessibilityEvent)
    {

    }

    @Override
    public void onInterrupt()
    {

    }

    @Override
    public void onCreate()
    {
        super.onCreate();
        instance = this;
    }

    @Override
    protected void onServiceConnected()
    {
        super.onServiceConnected();
        Miscellaneous.logEvent("i", "Accessibility service", "Service started.", 4);
    }
}