@Test public void getFetchHandler_nonMainFirebaseApp_doesNotUseAnalytics() { when(mockFirebaseApp.getName()).thenReturn("secondary"); ConfigFetchHandler fetchHandler = getNewFrcComponent() .getFetchHandler(DEFAULT_NAMESPACE, mockFetchedCache, mockMetadataClient); assertThat(fetchHandler.getAnalyticsConnector()).isNull(); }
@VisibleForTesting synchronized ConfigFetchHandler getFetchHandler( String namespace, ConfigCacheClient fetchedCacheClient, ConfigMetadataClient metadataClient) { return new ConfigFetchHandler( firebaseInstallations, isPrimaryApp(firebaseApp) ? analyticsConnector : null, executorService, DEFAULT_CLOCK, DEFAULT_RANDOM, fetchedCacheClient, getFrcBackendApiClient(firebaseApp.getOptions().getApiKey(), namespace, metadataClient), metadataClient, this.customHeaders); }
RemoteConfigComponent { @VisibleForTesting synchronized ConfigFetchHandler getFetchHandler( String namespace, ConfigCacheClient fetchedCacheClient, ConfigMetadataClient metadataClient) { return new ConfigFetchHandler( firebaseInstallations, isPrimaryApp(firebaseApp) ? analyticsConnector : null, executorService, DEFAULT_CLOCK, DEFAULT_RANDOM, fetchedCacheClient, getFrcBackendApiClient(firebaseApp.getOptions().getApiKey(), namespace, metadataClient), metadataClient, this.customHeaders); } }
RemoteConfigComponent { @VisibleForTesting synchronized ConfigFetchHandler getFetchHandler( String namespace, ConfigCacheClient fetchedCacheClient, ConfigMetadataClient metadataClient) { return new ConfigFetchHandler( firebaseInstallations, isPrimaryApp(firebaseApp) ? analyticsConnector : null, executorService, DEFAULT_CLOCK, DEFAULT_RANDOM, fetchedCacheClient, getFrcBackendApiClient(firebaseApp.getOptions().getApiKey(), namespace, metadataClient), metadataClient, this.customHeaders); } RemoteConfigComponent(
      Context context,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      FirebaseABTesting firebaseAbt,
      @Nullable AnalyticsConnector analyticsConnector); @VisibleForTesting protected  RemoteConfigComponent(
      Context context,
      ExecutorService executorService,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      FirebaseABTesting firebaseAbt,
      @Nullable AnalyticsConnector analyticsConnector,
      LegacyConfigsHandler legacyConfigsHandler,
      boolean loadGetDefault); }
RemoteConfigComponent { @VisibleForTesting synchronized ConfigFetchHandler getFetchHandler( String namespace, ConfigCacheClient fetchedCacheClient, ConfigMetadataClient metadataClient) { return new ConfigFetchHandler( firebaseInstallations, isPrimaryApp(firebaseApp) ? analyticsConnector : null, executorService, DEFAULT_CLOCK, DEFAULT_RANDOM, fetchedCacheClient, getFrcBackendApiClient(firebaseApp.getOptions().getApiKey(), namespace, metadataClient), metadataClient, this.customHeaders); } RemoteConfigComponent(
      Context context,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      FirebaseABTesting firebaseAbt,
      @Nullable AnalyticsConnector analyticsConnector); @VisibleForTesting protected  RemoteConfigComponent(
      Context context,
      ExecutorService executorService,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      FirebaseABTesting firebaseAbt,
      @Nullable AnalyticsConnector analyticsConnector,
      LegacyConfigsHandler legacyConfigsHandler,
      boolean loadGetDefault); @VisibleForTesting @KeepForSdk synchronized FirebaseRemoteConfig get(String namespace); @VisibleForTesting synchronized void setCustomHeaders(Map<String, String> customHeaders); static ConfigCacheClient getCacheClient(
      Context context, String appId, String namespace, String configStoreType); }
RemoteConfigComponent { @VisibleForTesting synchronized ConfigFetchHandler getFetchHandler( String namespace, ConfigCacheClient fetchedCacheClient, ConfigMetadataClient metadataClient) { return new ConfigFetchHandler( firebaseInstallations, isPrimaryApp(firebaseApp) ? analyticsConnector : null, executorService, DEFAULT_CLOCK, DEFAULT_RANDOM, fetchedCacheClient, getFrcBackendApiClient(firebaseApp.getOptions().getApiKey(), namespace, metadataClient), metadataClient, this.customHeaders); } RemoteConfigComponent(
      Context context,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      FirebaseABTesting firebaseAbt,
      @Nullable AnalyticsConnector analyticsConnector); @VisibleForTesting protected  RemoteConfigComponent(
      Context context,
      ExecutorService executorService,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      FirebaseABTesting firebaseAbt,
      @Nullable AnalyticsConnector analyticsConnector,
      LegacyConfigsHandler legacyConfigsHandler,
      boolean loadGetDefault); @VisibleForTesting @KeepForSdk synchronized FirebaseRemoteConfig get(String namespace); @VisibleForTesting synchronized void setCustomHeaders(Map<String, String> customHeaders); static ConfigCacheClient getCacheClient(
      Context context, String appId, String namespace, String configStoreType); static final String ACTIVATE_FILE_NAME; static final String FETCH_FILE_NAME; static final String DEFAULTS_FILE_NAME; static final long CONNECTION_TIMEOUT_IN_SECONDS; @VisibleForTesting static final String DEFAULT_NAMESPACE; }