private UnknownSdkDownloadTask doCreateTask(@Nullable Project project) {
    if (hasConsent()
        || Registry.is("sdk.download.consent", false)
        || ApplicationManager.getApplication().isUnitTestMode()) {
      return createTask().withListener(getMulticaster());
    }

    if (supportsSdkChoice()) {
      doChooseSdk();
    } else {
      collectConsent(project);
    }

    if (hasConsent()) {
      return createTask().withListener(getMulticaster());
    } else {
      getMulticaster().onResolveCancelled();
      return null;
    }
  }
private UnknownSdkDownloadTask doCreateTask(@Nullable Project project)