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

Make DisplayLeakActivity optional #1158

Closed
saguinav opened this issue Jan 7, 2019 · 1 comment
Closed

Make DisplayLeakActivity optional #1158

saguinav opened this issue Jan 7, 2019 · 1 comment

Comments

@saguinav
Copy link

saguinav commented Jan 7, 2019

Hi @pyricau !

My team tried to update Leak Canary to the latest version (1.6.2) and we noticed that this change (#1117) modified significantly how Leak Canary works in our builds.

To give you more context, our app defines an internal production flavor that gets distributed only for employees. In this internal production app we can enable/disable certain configuration flags, being one of them memory leaks detections. If the user enables memory leaks detection, any memory leak detected gets uploaded to our logging or crash report system, as explained in the Wiki here. Instead of extending from the DisplayLeakService, we extend from AbstractAnalysisResultService, which allow us to report the analysis results without the need of displaying the leak activity or installing the side LeakCanary app. This way employees see the ForegroundService notification when the memory is being dumped and analyzed but don't see an unknown application named Leaks mysteriously installed on their phone.
In addition, we also noticed that some of our Instrumentation tests were suddenly failing because of this new requirement of the library.

We believe it would be great to have an option to disable this requirement as you suggested in the description of the issue #1115. I hope this use case makes sense to you and has enough value to consider it. We are also opened to alternative solutions. Thanks in advance.

Cheers.

@pyricau
Copy link
Member

pyricau commented Jan 10, 2019

Makes a lot of sense, thanks for the detailed report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants