Lines Matching defs:VmPolicy
81 * StrictMode.setVmPolicy(new {@link VmPolicy.Builder StrictMode.VmPolicy.Builder}()
182 public static final int DETECT_VM_CURSOR_LEAKS = 0x200; // for VmPolicy
188 public static final int DETECT_VM_CLOSABLE_LEAKS = 0x400; // for VmPolicy
194 public static final int DETECT_VM_ACTIVITY_LEAKS = 0x800; // for VmPolicy
199 private static final int DETECT_VM_INSTANCE_LEAKS = 0x1000; // for VmPolicy
204 public static final int DETECT_VM_REGISTRATION_LEAKS = 0x2000; // for VmPolicy
209 private static final int DETECT_VM_FILE_URI_EXPOSURE = 0x4000; // for VmPolicy
287 * The current VmPolicy in effect.
289 * TODO: these are redundant (mask is in VmPolicy). Should remove sVmPolicyMask.
292 private static volatile VmPolicy sVmPolicy = VmPolicy.LAX;
534 public static final class VmPolicy {
538 public static final VmPolicy LAX = new VmPolicy(0, EMPTY_CLASS_LIMIT_MAP);
545 private VmPolicy(int mask, HashMap<Class, Integer> classInstanceLimit) {
555 return "[StrictMode.VmPolicy; mask=" + mask + "]";
559 * Creates {@link VmPolicy} instances. Methods whose names start
570 * StrictMode.VmPolicy policy = new StrictMode.VmPolicy.Builder()
588 * Build upon an existing VmPolicy.
590 public Builder(VmPolicy base) {
716 * Construct the VmPolicy instance.
722 public VmPolicy build() {
730 return new VmPolicy(mMask,
863 // introduce VmPolicy cleanly) but this isn't particularly
973 VmPolicy.Builder policyBuilder = new VmPolicy.Builder().detectAll().penaltyDropBox();
1431 VmPolicy policy = getVmPolicy();
1470 public static void setVmPolicy(final VmPolicy policy) {
1494 public static VmPolicy getVmPolicy() {
1513 StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
1654 System.err.println("StrictMode VmPolicy violation with POLICY_DEATH; shutting down.");