-
Notifications
You must be signed in to change notification settings - Fork 617
Simplify Crashlytics settings #3625
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
The "app" portion of the settings response is no longer used by Crashlytics. This commit removes parsing of that section, which required refactoring how the Task API is used to wait for settings to return. WIP
Coverage Report 1Affected Products
Test Logs
Notes |
Size Report 1Affected Products
Test Logs
Notes |
@Override | ||
public FeaturesSettingsData getFeaturesData() { | ||
return featuresData; | ||
public FeatureFlagData getFeatureFlagData() { |
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.
Why do we need these getters when the fields are public already?
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 Settings class gets mocked in some of the tests. But taking a closer look at those tests, I think I can replace all the mocks with actual instances.
TaskCompletionSource<AppSettingsData> fetchedAppSettings = | ||
new TaskCompletionSource<>(); | ||
fetchedAppSettings.trySetResult(fetchedSettings.getAppSettingsData()); | ||
appSettingsData.set(fetchedAppSettings); |
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.
Did you verify that we don't need to do this?
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.
It works as expected in the happy path. I found a bug that can occur when there's no network access, but it predates this PR by at least several versions. So I'm fairly confident the above lines are fine, but I'll work it all out when I fix that bug.
The "app" portion of the settings response is no longer used by
Crashlytics. This commit removes parsing of that section, which
required refactoring how the Task API is used to wait for settings
to return.
It also flattens the package hierarchy for the settings.* packages
and removes some unnecessary interfaces.