Crash Policy
data class CrashPolicy(val crashCaptureEnabled: Boolean = true, val anrWatchdogEnabled: Boolean = true, val anrThresholdMs: Long = DEFAULT_ANR_THRESHOLD_MS, val breadcrumbDepth: Int = DEFAULT_BREADCRUMB_DEPTH, val maxStackChars: Int = DEFAULT_MAX_STACK_CHARS, val maxThreadsInDump: Int = DEFAULT_MAX_THREADS_IN_DUMP, val maxFramesPerThread: Int = DEFAULT_MAX_FRAMES_PER_THREAD)
Controls uncaught-exception and ANR capture depth.
crashCaptureEnabled gates whether io.devconsole.DevConsole ever chains itself into the host's Thread.defaultUncaughtExceptionHandler; when false the handler is left completely untouched. anrWatchdogEnabled gates whether the ANR-detection thread ever starts.
The remaining fields bound the depth of what gets captured once those two gates are open: anrThresholdMs is how long the main thread must go unresponsive before an ANR is reported; breadcrumbDepth is the size of the ring buffer of recent, already-redacted timeline summaries serialized into the crash/ANR payload; maxStackChars, maxThreadsInDump, and maxFramesPerThread bound the all-thread dump captured on an ANR.
Constructors
Link copied to clipboard
constructor(crashCaptureEnabled: Boolean = true, anrWatchdogEnabled: Boolean = true, anrThresholdMs: Long = DEFAULT_ANR_THRESHOLD_MS, breadcrumbDepth: Int = DEFAULT_BREADCRUMB_DEPTH, maxStackChars: Int = DEFAULT_MAX_STACK_CHARS, maxThreadsInDump: Int = DEFAULT_MAX_THREADS_IN_DUMP, maxFramesPerThread: Int = DEFAULT_MAX_FRAMES_PER_THREAD)