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

Add Proguard rules for WindowCallbackWrapper #32

Closed
pyricau opened this issue Jan 10, 2022 · 2 comments · Fixed by #33
Closed

Add Proguard rules for WindowCallbackWrapper #32

pyricau opened this issue Jan 10, 2022 · 2 comments · Fixed by #33

Comments

@pyricau
Copy link
Member

pyricau commented Jan 10, 2022

Copied over from square/leakcanary#2280 by @mlilienberg

Description

My app is crashing when showing Dialog Fragments while R8 is turned on and with latest version 2.8.1.
I think the issue is that curtains dependency does not provide correct proguard rules. curtains.internal.WindowCallbackWrapper is accessing WindowCallbackWrapper from androidx and android.support via reflection. Adding proguard rules to app level solves the issue for me but it would be better if leakcanary or curtains could define those rules.

-keep class androidx.appcompat.view.WindowCallbackWrapper { *; }
-keep class android.support.v7.view.WindowCallbackWrapper { *; }
@CoXier
Copy link
Contributor

CoXier commented Jan 12, 2022

I don't think is a good idea to add keep rule.

As a library, why not let user pass androidx.appcompat.view.WindowCallbackWrapper or android.support.v7.view.WindowCallbackWrapper into curtains.

@pyricau
Copy link
Member Author

pyricau commented Apr 2, 2022

As a library, why not let user pass androidx.appcompat.view.WindowCallbackWrapper or android.support.v7.view.WindowCallbackWrapper into curtains.

@CoXier what would the API look like for this? I'm not sure we'd be able to support this and keep Curtain working smoothly.

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 a pull request may close this issue.

2 participants