added in API level 28

StrictMode.OnThreadViolationListener

public static interface StrictMode.OnThreadViolationListener

android.os.StrictMode.OnThreadViolationListener


When #StrictMode.ThreadPolicy.Builder.penaltyListener(Executor, StrictMode.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