Here you can find the source of activateStrictMode()
public static void activateStrictMode()
import android.os.StrictMode; public class Main { public static void activateStrictMode() { if (isDebugBuild()) { StrictMode//from w w w . j ava 2s. c o m .setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskReads() .detectNetwork().penaltyLog() .build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() .detectLeakedSqlLiteObjects() .detectLeakedClosableObjects().penaltyLog() .detectActivityLeaks() .detectLeakedRegistrationObjects() .build()); } } public static boolean isDebugBuild() { return false; } }