private boolean containsGoogleAccessibilityService(){
  android.view.accessibility.AccessibilityManager accessibilityManager=getAccessibilityManager();
  List<AccessibilityServiceInfo> enabledServices=accessibilityManager.getEnabledAccessibilityServiceList(AccessibilityServiceInfo.FEEDBACK_ALL_MASK);
  if (enabledServices != null) {
    for (    AccessibilityServiceInfo enabledService : enabledServices) {
      String serviceId=enabledService.getId();
      if (serviceId != null && serviceId.startsWith(ACCESSIBILITY_PACKAGE_NAME_PREFIX)) {
        return true;
      }
    }
  }
  return false;
}

private boolean containsGoogleAccessibilityService ( ) { android . view . accessibility . AccessibilityManager accessibilityManager = getAccessibilityManager ( ) ; List < AccessibilityServiceInfo > enabledServices = accessibilityManager . getEnabledAccessibilityServiceList ( AccessibilityServiceInfo . FEEDBACK_ALL_MASK ) ; if ( enabledServices != null ) { for ( AccessibilityServiceInfo enabledService : enabledServices ) { String serviceId = enabledService . getId ( ) ; if ( serviceId != null && serviceId . startsWith ( ACCESSIBILITY_PACKAGE_NAME_PREFIX ) ) { return true ; } } } return false ; }
checks whether google accessibility services are enabled , including talkback , switch access , and others
