Skip to content

Commit

Permalink
Use consents, if initialized, but not supplied
Browse files Browse the repository at this point in the history
  • Loading branch information
DeKaN committed Apr 22, 2024
1 parent 4ad9522 commit 2e35a4b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@ public class PianoAnalytics internal constructor(
pianoConsents: PianoConsents? = null,
dataEncoder: DataEncoder = PlainDataEncoder,
): PianoAnalytics {
DependenciesProvider.init(context, configuration, pianoConsents, dataEncoder)
DependenciesProvider.init(
context,
configuration,
pianoConsents ?: runCatching { PianoConsents.getInstance() }.getOrNull(),
dataEncoder
)
return getInstance()
}

Expand Down

0 comments on commit 2e35a4b

Please sign in to comment.