Android Guides | Samples

Android.OS.StrictMode.ThreadPolicy Class

StrictMode policy applied to a certain thread.

See Also: StrictMode+ThreadPolicy

Syntax

[Android.Runtime.Register("android/os/StrictMode$ThreadPolicy", DoNotGenerateAcw=true)]
public sealed class StrictMode.ThreadPolicy : Object

Remarks

StrictMode policy applied to a certain thread.

The policy is enabled by StrictMode.SetThreadPolicy(StrictMode+ThreadPolicy). The current policy can be retrieved with StrictMode.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.

[Android Documentation]

Requirements

Namespace: Android.OS
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 9

The members of Android.OS.StrictMode.ThreadPolicy are listed below.

See Also: Object

Public Properties

[read-only]
static
LaxStrictMode+ThreadPolicy. The default, lax policy which doesn't catch anything.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.