-
Notifications
You must be signed in to change notification settings - Fork 627
Make ABT Dynamic-Module compliant. #2524
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
Conversation
Changes the dependency on analytics to an optional Provider.
Coverage ReportAffected SDKs
Test Logs
NotesHTML coverage reports can be produced locally with Head commit (ba024643) is created by Prow via merging commits: 8b5b455 4122bc7. |
Binary Size ReportAffected SDKs
Test Logs
NotesHead commit (ba024643) is created by Prow via merging commits: 8b5b455 4122bc7. |
} | ||
|
||
@WorkerThread | ||
private int getMaxUserPropertiesInAnalytics() { | ||
if (maxUserProperties == null) { | ||
maxUserProperties = analyticsConnector.getMaxUserProperties(originService); | ||
maxUserProperties = analyticsConnector.get().getMaxUserProperties(originService); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking: @WorkerThread
methods don't need to check for null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check is not required for the same reason you mentioned below, the check is done prior to calling this method
@@ -333,11 +334,14 @@ private void removeExperiments(Collection<ConditionalUserProperty> experiments) | |||
} | |||
|
|||
private void addExperimentToAnalytics(ConditionalUserProperty experiment) { | |||
analyticsConnector.setConditionalUserProperty(experiment); | |||
AnalyticsConnector connector = this.analyticsConnector.get(); | |||
if (connector != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking: this is just a safety check, but connector
will never be null here (and at the other checks) since throwAbtExceptionIfAnalyticsIsNull()
is called first in the public methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, removed to be consistent with previous behavior
Changes the dependency on analytics to an optional Provider.