@Deprecated
  public static @NotNull ModalityState getCurrentThreadProgressModality() {
    ModalityState contextModality = currentThreadContextModality();
    if (contextModality != null) {
      return contextModality;
    }

    ProgressManager progressManager = ProgressManager.getInstanceOrNull();
    ModalityState progressModality = progressManager == null ? null : progressManager.getCurrentProgressModality();
    return progressModality == null ? ModalityState.nonModal() : progressModality;
  }
@Deprecated
  public static @NotNull ModalityState getCurrentThreadProgressModality()