-
Notifications
You must be signed in to change notification settings - Fork 4k
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
New EventListener + HeapDumper APIs #2237
Conversation
4147c89
to
419197d
Compare
Inspired from #2197 Co-authored-by: itznotabug <itznotabug@gmail.com>
/** | ||
* When receiving a [HeapDump] event, starts a WorkManager worker that performs heap analysis. | ||
*/ | ||
object WorkManagerHeapAnalyzer : EventListener { |
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.
@ItzNotABug thanks for #2197 ! It was super helpful to get this done.
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.
Great! Happy to help. :)
c3455df
to
1d9f654
Compare
- Support job cancelation for remote job - Fix bug that led to job cancelation when :leakcanary starts - Ensuring Events are all serializable - Moved AndroidDebugHeapAnalyzer to internal
1d9f654
to
34d5023
Compare
* } | ||
* ``` | ||
*/ | ||
val eventListeners: List<EventListener> = listOf( |
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.
this is smart!
…ions and support leakcanary custom dumper square/leakcanary#2237 Signed-off-by: xueqiushi <xueqiushi@kuaishou.com>
Fixes #1682 (EventListener API)
Fixes #2192 (ForegroundServiceStartNotAllowedException)
Fixes #2214 (disable heap dumping toast)
HeapDumper API makes it possible to ship #2121 (fast native dump) outside the LeakCanary repo: