-
Notifications
You must be signed in to change notification settings - Fork 627
Fix reflection error in com.google.android.datatransport.Priority when using aggressive Proguard rules. #2016
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 enum's values are accessed via reflection, so aggressive Proguard rules can cause it to be stripped out. e.g., #1996
@vkryachko Are you aware of other places where reflection is used in datatransport? This rule will fix a Crashlytics customer crash. Could there be similar issues lurking for other SDKs? |
Binary Size ReportAffected SDKs
Test Logs
NotesHead commit (f8335ef3) is created by Prow via merging commits: aa3c89f 2de2488. |
Coverage ReportAffected SDKsNo changes between base commit (aa3c89f) and head commit (f8335ef3). Test Logs
NotesHTML coverage reports can be produced locally with Head commit (f8335ef3) is created by Prow via merging commits: aa3c89f 2de2488. |
@mrichards I think the underlying issue is the fact that datatransport uses an Line 24 in 12ae453
|
EnumMap uses reflection under the hood. Switching to a HashMap removes the reflection call, so we don't need the Proguard rule keeping `values` after all.
Yes, that worked. See most recent commit. |
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.
LGTM, thanks for the fix!
The enum's values are accessed via reflection, so aggressive Proguard
rules can cause it to be stripped out.
e.g., #1996