Added in API level 28

OnThreadViolationListener


interface OnThreadViolationListener
android.os.StrictMode.OnThreadViolationListener

When #ThreadPolicy.Builder#penaltyListener is enabled, the listener is called on the provided executor when a Thread violation occurs.

Summary

Public methods
abstract Unit

Called on a thread policy violation.

Public methods

onThreadViolation

Added in API level 28
abstract fun onThreadViolation(v: Violation!): Unit

Called on a thread policy violation.