<commit_before>/*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

package com.facebook.fresco.vito.core;

import com.facebook.common.internal.Supplier;
import com.facebook.common.internal.Suppliers;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.infer.annotation.OkToExtend;

@Nullsafe(Nullsafe.Mode.STRICT)
@OkToExtend
public class DefaultFrescoVitoConfig implements FrescoVitoConfig {

  private final PrefetchConfig mPrefetchConfig = new DefaultPrefetchConfig();

  @Override
  public PrefetchConfig getPrefetchConfig() {
    return mPrefetchConfig;
  }

  @Override
  public boolean submitFetchOnBgThread() {
    return true;
  }

  @Override
  public boolean useBindOnly() {
    return false;
  }

  @Override
  public boolean useNewReleaseCallback() {
    return false;
  }

  @Override
  public Supplier<Boolean> useNativeRounding() {
    return Suppliers.BOOLEAN_TRUE;<commit_msg>Added possibility to use DefaultFrescoVitoConfig with custom prefetch config<commit_after>/*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

package com.facebook.fresco.vito.core;

import com.facebook.common.internal.Supplier;
import com.facebook.common.internal.Suppliers;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.infer.annotation.OkToExtend;

@Nullsafe(Nullsafe.Mode.STRICT)
@OkToExtend
public class DefaultFrescoVitoConfig implements FrescoVitoConfig {

  private final PrefetchConfig mPrefetchConfig;

  public DefaultFrescoVitoConfig() {
    this(new DefaultPrefetchConfig());
  }

  public DefaultFrescoVitoConfig(PrefetchConfig prefetchConfig) {
    mPrefetchConfig = prefetchConfig;
  }

  @Override
  public PrefetchConfig getPrefetchConfig() {
    return mPrefetchConfig;
  }

  @Override
  public boolean submitFetchOnBgThread() {
    return true;
  }

  @Override
  public boolean useBindOnly() {
    return false;
  }

  @Override
  public boolean useNewReleaseCallback() {
    return false;
  }

  @Override
  public Supplier<Boolean> useNativeRounding() {
    return Suppliers.BOOLEAN_TRUE;
{'fraction_non_alphanumeric': 0.07861771058315335, 'fraction_numerical': 0.0, 'mean_word_length': 4.54066985645933, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6991134', 'n_tokens_mistral': 700, 'n_tokens_neox': 674, 'n_words': 180}