Here you can find the source of isAccessibilityEnabled(Context context, String id)
public static boolean isAccessibilityEnabled(Context context, String id)
//package com.java2s; import java.util.List; import android.accessibilityservice.AccessibilityServiceInfo; import android.content.Context; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; public class Main { public static boolean isAccessibilityEnabled(Context context, String id) { AccessibilityManager am = (AccessibilityManager) context .getSystemService(Context.ACCESSIBILITY_SERVICE); List<AccessibilityServiceInfo> runningServices = am .getEnabledAccessibilityServiceList(AccessibilityEvent.TYPES_ALL_MASK); for (AccessibilityServiceInfo service : runningServices) { if (id.equals(service.getId())) { return true; }/*from w w w .j av a 2 s .c o m*/ } return false; } }