public static boolean isAllowedByUserConsent() {
    UsageStatisticsPersistenceComponent settings = UsageStatisticsPersistenceComponent.getInstance();
    if (settings != null && settings.isAllowed()) {
      return true;
    }

    ConsentOptionsProvider consentsProvider = ApplicationManager.getApplication().getService(ConsentOptionsProvider.class);
    if (consentsProvider != null && consentsProvider.isActivatedWithFreeLicense()) {
      return true;
    }

    return false;
  }
public static boolean isAllowedByUserConsent()