File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010/** Configures data that the SDK collects automatically. */
1111public final class DataCollection {
1212
13- private boolean overridden ;
13+ // Forces Data Collection to be used even when no individual option has been configured.
14+ private boolean forceDataCollection ;
1415 private @ Nullable Boolean userInfo ;
1516 private @ Nullable KeyValueCollectionBehavior cookies ;
1617 private @ Nullable KeyValueCollectionBehavior urlQueryParams ;
@@ -23,8 +24,8 @@ public DataCollection() {
2324 this (true );
2425 }
2526
26- DataCollection (final boolean overridden ) {
27- this .overridden = overridden ;
27+ DataCollection (final boolean forceDataCollection ) {
28+ this .forceDataCollection = forceDataCollection ;
2829 }
2930
3031 public @ Nullable Boolean getUserInfo () {
@@ -82,7 +83,7 @@ public void setDatabaseQueryData(final boolean databaseQueryData) {
8283
8384 @ ApiStatus .Internal
8485 boolean isExplicitlyConfigured () {
85- return overridden
86+ return forceDataCollection
8687 || userInfo != null
8788 || cookies != null
8889 || urlQueryParams != null
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import kotlin.test.assertFailsWith
66
77class DataCollectionTest {
88 @Test
9- fun `public constructor creates explicit empty configuration` () {
9+ fun `public constructor forces Data Collection for empty configuration` () {
1010 val dataCollection = DataCollection ()
1111
1212 assertThat(dataCollection.userInfo).isNull()
@@ -22,7 +22,7 @@ class DataCollectionTest {
2222 }
2323
2424 @Test
25- fun `SDK-owned configuration starts unconfigured ` () {
25+ fun `SDK-owned configuration does not force Data Collection ` () {
2626 val dataCollection = DataCollection (false )
2727
2828 assertThat(dataCollection.isExplicitlyConfigured()).isFalse()
You can’t perform that action at this time.
0 commit comments