diff --git a/src/main/java/io/split/android/client/telemetry/storage/TelemetryConfigProviderImpl.java b/src/main/java/io/split/android/client/telemetry/storage/TelemetryConfigProviderImpl.java index b937411c4..1e98944f2 100644 --- a/src/main/java/io/split/android/client/telemetry/storage/TelemetryConfigProviderImpl.java +++ b/src/main/java/io/split/android/client/telemetry/storage/TelemetryConfigProviderImpl.java @@ -20,16 +20,16 @@ public class TelemetryConfigProviderImpl implements TelemetryConfigProvider { private final TelemetryStorageConsumer mTelemetryConsumer; private final SplitClientConfig mSplitClientConfig; - private final int mFlagSetCount; + private final int mValidFlagSetCount; private final int mInvalidFlagSetCount; public TelemetryConfigProviderImpl(@NonNull TelemetryStorageConsumer telemetryConsumer, @NonNull SplitClientConfig splitClientConfig, - int flagSetCount, + int validFlagSetCount, int invalidFlagSetCount) { mTelemetryConsumer = checkNotNull(telemetryConsumer); mSplitClientConfig = checkNotNull(splitClientConfig); - mFlagSetCount = flagSetCount; + mValidFlagSetCount = validFlagSetCount; mInvalidFlagSetCount = invalidFlagSetCount; } @@ -50,7 +50,7 @@ public Config getConfigTelemetry() { config.setImpressionsQueueSize(mSplitClientConfig.impressionsQueueSize()); config.setEventsQueueSize(mSplitClientConfig.eventsQueueSize()); config.setUserConsent(mSplitClientConfig.userConsent().intValue()); - config.setFlagSetsTotal(mFlagSetCount); + config.setFlagSetsTotal(mValidFlagSetCount + mInvalidFlagSetCount); config.setFlagSetsInvalid(mInvalidFlagSetCount); if (mSplitClientConfig.impressionsMode() == ImpressionsMode.DEBUG) { config.setImpressionsMode(io.split.android.client.telemetry.model.ImpressionsMode.DEBUG.intValue()); diff --git a/src/test/java/io/split/android/client/telemetry/storage/TelemetryConfigProviderImplTest.java b/src/test/java/io/split/android/client/telemetry/storage/TelemetryConfigProviderImplTest.java index ab4352c1f..8e4b773f6 100644 --- a/src/test/java/io/split/android/client/telemetry/storage/TelemetryConfigProviderImplTest.java +++ b/src/test/java/io/split/android/client/telemetry/storage/TelemetryConfigProviderImplTest.java @@ -81,7 +81,7 @@ public void close() { assertTrue(configTelemetry.getUrlOverrides().isEvents()); assertTrue(configTelemetry.getUrlOverrides().isAuth()); assertTrue(configTelemetry.getUrlOverrides().isStream()); - assertEquals(4, configTelemetry.getFlagSetsTotal()); + assertEquals(6, configTelemetry.getFlagSetsTotal()); assertEquals(2, configTelemetry.getFlagSetsInvalid()); } }