Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DIA-4456 integrate core /meta-data #835

Merged
merged 13 commits into from
Sep 28, 2024

Conversation

andresilveirah
Copy link
Member

  • add mobile-core as dependency
  • introduce a reference to core's SourcepointClient into NetworkClient
  • use core's /meta-data implementation
  • remove sdk's original /meta-data code

if (newRate != dataStorage.ccpaSampleRate) {
dataStorage.ccpaSampleRate = newRate
ccpa.sampleRate.let { newRate ->
if (newRate.toDouble() != dataStorage.ccpaSampleRate) {
Copy link
Collaborator

@Nevazhnovu Nevazhnovu Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once again, I am not sure how kotlin handles things, but a straight comparison of two values with floating point might be error-prone.
Based on my C# experience, I would drop this banger:

if( newRate.toDouble() - dataStorage.ccpaSampleRate > Math.Epsilon )

Where Math.Epsilon is a really tiny value (0.000001 or similar).
Might be a false alarm, though :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a very good point. I thought about it while coding, but forgot to address it.

@andresilveirah andresilveirah merged commit 1fa50f6 into develop Sep 28, 2024
4 checks passed
@andresilveirah andresilveirah deleted the DIA-4456_integrate_mobile-core branch September 28, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants