Added in API level 28

StrictMode.OnThreadViolationListener


public static interface StrictMode.OnThreadViolationListener

android.os.StrictMode.OnThreadViolationListener


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

Summary

Public methods

abstract void onThreadViolation(Violation v)

Called on a thread policy violation.

Public methods

onThreadViolation

Added in API level 28
public abstract void onThreadViolation (Violation v)

Called on a thread policy violation.

Parameters
v Violation