Set Thread Policy Strict Mode - Android android.util

Android examples for android.util:StrictMode

Description

Set Thread Policy Strict Mode

Demo Code

public class Main {

  public static void StrictMode09() {
    android.os.StrictMode.setThreadPolicy(new android.os.StrictMode.ThreadPolicy.Builder().detectDiskReads()
        .detectDiskWrites().detectNetwork().penaltyLog().build());
    android.os.StrictMode.setVmPolicy(/*from  www.  j a  v  a2s  .c o  m*/
        new android.os.StrictMode.VmPolicy.Builder().detectLeakedSqlLiteObjects().penaltyLog().penaltyDeath().build());
  }

}

Related Tutorials