Skip to content

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

Merged
merged 3 commits into from
Mar 22, 2021
Merged

Make ABT Dynamic-Module compliant. #2524

merged 3 commits into from
Mar 22, 2021

Conversation

vkryachko
Copy link
Member

Changes the dependency on analytics to an optional Provider.

Changes the dependency on analytics to an optional Provider.
@google-cla google-cla bot added the cla: yes Override cla label Mar 18, 2021
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Mar 18, 2021

Coverage Report

Affected SDKs

  • firebase-abt

    SDK overall coverage changed from 82.35% (8b5b455) to 82.29% (ba024643) by -0.06%.

    Filename Base (8b5b455) Head (ba024643) Diff
    FirebaseABTesting.java 97.98% 98.06% +0.08%

Test Logs

Notes

HTML coverage reports can be produced locally with ./gradlew <product>:checkCoverage.
Report files are located at <product-build-dir>/reports/jacoco/.

Head commit (ba024643) is created by Prow via merging commits: 8b5b455 4122bc7.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Mar 18, 2021

Binary Size Report

Affected SDKs

  • firebase-abt

    Type Base (8b5b455) Head (ba024643) Diff
    aar 13.8 kB 14.0 kB +215 B (+1.6%)
    apk (aggressive) 78.5 kB 78.6 kB +32 B (+0.0%)
    apk (release) 640 kB 640 kB +96 B (+0.0%)

Test Logs

Notes

Head 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);
Copy link
Contributor

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?

Copy link
Member Author

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) {
Copy link
Contributor

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

Copy link
Member Author

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

@vkryachko vkryachko merged commit 125a493 into master Mar 22, 2021
@vkryachko vkryachko deleted the vk.abt_provider branch March 22, 2021 16:26
@firebase firebase locked and limited conversation to collaborators Apr 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Override cla size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants