Example usage for Java android.os StrictMode fields, constructors, methods, implement or subclass
The text is from its open source code.
ThreadPolicy | allowThreadDiskReads() A convenience wrapper that takes the current ThreadPolicy from #getThreadPolicy , modifies it to permit disk reads, and sets the new policy with #setThreadPolicy , returning the old policy so you can restore it at the end of a block. |
ThreadPolicy | allowThreadDiskWrites() A convenience wrapper that takes the current ThreadPolicy from #getThreadPolicy , modifies it to permit both disk reads & writes, and sets the new policy with #setThreadPolicy , returning the old policy so you can restore it at the end of a block. |
void | disableDeathOnFileUriExposure() Used by lame internal apps that haven't done the hard work to get themselves off file:// Uris yet. |
void | enableDeathOnFileUriExposure() Used by the framework to make file usage a fatal error. |
void | enableDefaults() Enable the recommended StrictMode defaults, with violations just being logged. |
ThreadPolicy | getThreadPolicy() Returns the current thread's policy. |
VmPolicy | getVmPolicy() Gets the current VM policy. |
void | noteSlowCall(String name) For code to note that it's slow. |
void | setThreadPolicy(final ThreadPolicy policy) Sets the policy for what actions on the current thread should be detected, as well as the penalty if such actions occur. |
void | setVmPolicy(final VmPolicy policy) Sets the policy for what actions in the VM process (on any thread) should be detected, as well as the penalty if such actions occur. |