Merge "Disable activity leak detection by default for userdebug" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
956ea5f09d
@@ -936,6 +936,11 @@ public final class StrictMode {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Builder disable(int bit) {
|
||||||
|
mMask &= ~bit;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the VmPolicy instance.
|
* Construct the VmPolicy instance.
|
||||||
*
|
*
|
||||||
@@ -1214,7 +1219,13 @@ public final class StrictMode {
|
|||||||
if (IS_USER_BUILD) {
|
if (IS_USER_BUILD) {
|
||||||
setCloseGuardEnabled(false);
|
setCloseGuardEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
VmPolicy.Builder policyBuilder = new VmPolicy.Builder().detectAll().penaltyDropBox();
|
VmPolicy.Builder policyBuilder = new VmPolicy.Builder().detectAll();
|
||||||
|
if (!IS_ENG_BUILD) {
|
||||||
|
// Activity leak detection causes too much slowdown for userdebug because of the
|
||||||
|
// GCs.
|
||||||
|
policyBuilder = policyBuilder.disable(DETECT_VM_ACTIVITY_LEAKS);
|
||||||
|
}
|
||||||
|
policyBuilder = policyBuilder.penaltyDropBox();
|
||||||
if (IS_ENG_BUILD) {
|
if (IS_ENG_BUILD) {
|
||||||
policyBuilder.penaltyLog();
|
policyBuilder.penaltyLog();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user