Added in API level 9

ThreadPolicy

class ThreadPolicy
kotlin.Any
   ↳ android.os.StrictMode.ThreadPolicy

StrictMode policy applied to a certain thread.

The policy is enabled by setThreadPolicy. The current policy can be retrieved with getThreadPolicy.

Note that multiple penalties may be provided and they're run in order from least to most severe (logging before process death, for example). There's currently no mechanism to choose different penalties for different detected actions.

Summary

Nested classes

Creates ThreadPolicy instances.

Public methods
String

Properties
static StrictMode.ThreadPolicy!

The lax policy which doesn't catch anything.

Public methods

toString

Added in API level 9
fun toString(): String
Return
String a string representation of the object.

Properties

LAX

Added in API level 9
static val LAX: StrictMode.ThreadPolicy!

The lax policy which doesn't catch anything.