EventListener

fun interface EventListener

Types

Event
Link copied to clipboard
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.

Functions

onEvent
Link copied to clipboard
abstract fun onEvent(event: EventListener.Event)

onEvent is always called from the thread the events are emitted from, which is documented for each event. This enables you to potentially block a chain of events, waiting for some pre work to be done.

Inheritors

BackgroundThreadHeapAnalyzer
Link copied to clipboard
LazyForwardingEventListener
Link copied to clipboard
LogcatEventListener
Link copied to clipboard
NotificationEventListener
Link copied to clipboard
RemoteWorkManagerHeapAnalyzer
Link copied to clipboard
ToastEventListener
Link copied to clipboard
TvEventListener
Link copied to clipboard
WorkManagerHeapAnalyzer
Link copied to clipboard