code: private static Provider getAndroidSecurityProvider() {
      Provider[] providers = Security.getProviders();
      for (Provider availableProvider : providers) {
        for (String providerClassName : ANDROID_SECURITY_PROVIDERS) {
          if (providerClassName.equals(availableProvider.getClass().getName())) {
            logger.log(Level.FINE, "Found registered provider {0}", providerClassName);
            return availableProvider;
          }
        }
      }
      logger.log(Level.WARNING, "Unable to find Conscrypt");
      return null;
    }
docs: Select the first recognized security provider according to the preference order returned by
  {@link Security#getProviders}. If a recognized provider is not found then warn but continue.