Lines Matching defs:StrictMode
53 * <p>StrictMode is a developer tool which detects things you might be
57 * <p>StrictMode is most commonly used to catch accidental disk or
82 * StrictMode.setThreadPolicy(new {@link ThreadPolicy.Builder StrictMode.ThreadPolicy.Builder}()
88 * StrictMode.setVmPolicy(new {@link VmPolicy.Builder StrictMode.VmPolicy.Builder}()
107 * But don't feel compelled to fix everything that StrictMode finds. In particular,
109 * StrictMode to find things you did by accident. Network requests on the UI thread
112 * <p class="note">StrictMode is not a security mechanism and is not
118 * more (or fewer) operations, so you should never leave StrictMode
121 public final class StrictMode {
122 private static final String TAG = "StrictMode";
134 public static final String DISABLE_PROPERTY = "persist.sys.strictmode.disable";
141 public static final String VISUAL_PROPERTY = "persist.sys.strictmode.visual";
148 private static final String CLEARTEXT_PROPERTY = "persist.sys.strictmode.clear";
181 * For StrictMode.noteSlowCall()
188 * For StrictMode.noteResourceMismatch()
331 private StrictMode() {}
334 * {@link StrictMode} policy applied to a certain thread.
358 return "[StrictMode.ThreadPolicy; mask=" + mask + "]";
373 * StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
377 * StrictMode.setThreadPolicy(policy);
587 * {@link StrictMode} policy applied to all threads in the virtual machine's process.
612 return "[StrictMode.VmPolicy; mask=" + mask + "]";
627 * StrictMode.VmPolicy policy = new StrictMode.VmPolicy.Builder()
631 * StrictMode.setVmPolicy(policy);
1084 int threadPolicyMask = StrictMode.DETECT_DISK_WRITE |
1085 StrictMode.DETECT_DISK_READ |
1086 StrictMode.DETECT_NETWORK;
1089 threadPolicyMask |= StrictMode.PENALTY_DROPBOX;
1092 threadPolicyMask |= StrictMode.PENALTY_FLASH;
1095 StrictMode.setThreadPolicyMask(threadPolicyMask);
1257 // Not part of BlockGuard.Policy; just part of StrictMode:
1270 // Not part of BlockGuard.Policy; just part of StrictMode:
1468 Log.d(TAG, "StrictMode policy violation; ~duration=" +
1471 Log.d(TAG, "StrictMode policy violation: " + info.crashInfo.stackTrace);
1476 // subset of the original StrictMode policy bitmask, with
1523 Log.e(TAG, "RemoteException trying to handle StrictMode violation", e);
1579 Log.e(TAG, "RemoteException handling StrictMode violation", e);
1640 private static boolean sIsIdlerRegistered = false; // guarded by StrictMode.class
1661 synchronized (StrictMode.class) {
1706 synchronized (StrictMode.class) {
1712 * Enable the recommended StrictMode defaults, with violations just being logged.
1720 StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
1724 StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
1892 // subset of the original StrictMode policy bitmask, with
1911 Log.e(TAG, "RemoteException trying to handle StrictMode violation", e);
1920 System.err.println("StrictMode VmPolicy violation with POLICY_DEATH; shutting down.");
2003 * requires changing the StrictMode policy mask. The role of this
2127 * to any strictmode violation that happens while this span is
2172 * current thread's {@link android.os.StrictMode.ThreadPolicy} has
2173 * {@link android.os.StrictMode.ThreadPolicy.Builder#detectCustomSlowCalls}
2182 // StrictMode not enabled.
2191 * {@link android.os.StrictMode.ThreadPolicy} has
2192 * {@link android.os.StrictMode.ThreadPolicy.Builder#detectResourceMismatches()}
2202 // StrictMode not enabled.
2214 // StrictMode not enabled.
2226 // StrictMode not enabled.
2232 // Guarded by StrictMode.class
2253 synchronized (StrictMode.class) {
2273 synchronized (StrictMode.class) {
2302 // being restarted. Granted, it is only a problem when StrictMode is enabled
2545 new StackTraceElement("android.os.StrictMode", "setClassInstanceLimit",
2546 "StrictMode.java", 1)