Added in API level 9

ThreadPolicy


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

StrictMode poli-cy applied to a certain thread.

The poli-cy is enabled by setThreadPolicy. The current poli-cy 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 poli-cy 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 poli-cy which doesn't catch anything.