See Also: StrictMode+ThreadPolicy+Builder
public sealed class StrictMode.ThreadPolicy.Builder : Object
Creates StrictMode+ThreadPolicy instances. Methods whose names start with detect specify what problems we should look for. Methods whose names start with penalty specify what we should do when we detect a problem.
You can call as many detect and penalty methods as you like. Currently order is insignificant: all penalties apply to all detected problems.
For example, detect everything and log anything that's found:
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder() .detectAll() .penaltyLog() .build(); StrictMode.setThreadPolicy(policy);
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.Builder are listed below.
See Also: Object
|Create a Builder that detects nothing and has no violations. (but note that StrictMode+ThreadPolicy+Builder.Build will default to enabling StrictMode+ThreadPolicy+Builder.PenaltyLog if no other penalties are specified)|
|Initialize a Builder from an existing ThreadPolicy.|
Construct the ThreadPolicy instance.
Detect everything that's potentially suspect.
Enable detection of slow calls.
Enable detection of disk reads.
Enable detection of disk writes.
Enable detection of network operations.
Crash the whole process on violation.
Crash the whole process on any network usage.
Show an annoying dialog to the developer on detected violations, rate-limited to be only a little annoying.
Enable detected violations log a stacktrace and timing data to the DropBoxManager on policy violation.
Flash the screen during a violation.
Log detected violations to the system log.
Disable the detection of everything.
Disable detection of slow calls.
Disable detection of disk reads.
Disable detection of disk writes.
Disable detection of network operations.