Skip to content
🤔 Documentation issue? Report it

//leakcanary/leakcanary/EventListener/Event

Event

sealed class Event : Serializable

Note: Event is Serializable for convenience but we currently make no guarantee that the Serialization is backward / forward compatible across LeakCanary versions, so plan accordingly. This is convenient for passing events around processes, and shouldn’t be used to store them.

Types

Name Summary
DumpingHeap class DumpingHeap(val uniqueId: String) : EventListener.Event
Sent from the "LeakCanary-Heap-Dump" HandlerThread.
HeapAnalysisDone sealed class HeapAnalysisDone<T : HeapAnalysis> : EventListener.Event
Sent from the thread performing the analysis.
HeapAnalysisProgress class HeapAnalysisProgress(val uniqueId: String, val step: OnAnalysisProgressListener.Step, val progressPercent: Double) : EventListener.Event
progressPercent is a value between 0..1
HeapDump class HeapDump(val uniqueId: String, val file: File, val durationMillis: Long, val reason: String) : EventListener.Event
Sent from the "LeakCanary-Heap-Dump" HandlerThread.
HeapDumpFailed class HeapDumpFailed(val uniqueId: String, val exception: Throwable, val willRetryLater: Boolean) : EventListener.Event
Sent from the "LeakCanary-Heap-Dump" HandlerThread.

Properties

Name Summary
uniqueId val uniqueId: String
Unique identifier for a related chain of event. The identifier for the events that run before HeapDump gets reset right before HeapDump is sent.

Inheritors

Name
DumpingHeap
HeapDump
HeapDumpFailed
HeapAnalysisProgress
HeapAnalysisDone