public static boolean isSendAllowed() {
    if (isSuppressStatisticsReport() || isLocalStatisticsWithoutReport()) {
      return false;
    }

    if (ApplicationManager.getApplication().isHeadlessEnvironment()) {
      return isHeadlessStatisticsEnabled();
    }

    return isAllowedByUserConsent();
  }
public static boolean isSendAllowed()