class DataCollectionHelper {

  public boolean isAutomaticDataCollectionEnabled() {

    // We follow this order of precedence:
    // P0 - the manual override in shared prefs
    // P1 - the product-level manifest override
    // P2 - the global-level value

    if (isProductManuallySet()) {
      return sharedPreferencesUtils.getBooleanPreference(AUTO_INIT_PREFERENCES, true);
    }
    if (isProductManifestSet()) {
      return sharedPreferencesUtils.getBooleanManifestValue(
          MANIFEST_METADATA_AUTO_INIT_ENABLED, true);
    }
    return isGlobalAutomaticDataCollectionEnabled.get();
  }

  @Inject public  DataCollectionHelper(
      FirebaseApp firebaseApp,
      SharedPreferencesUtils sharedPreferencesUtils,
      Subscriber firebaseEventsSubscriber);

}