mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Not generating memory dump for intentional leak tests
Memory dump can be generated only once, so generating it in the intentional leak test leaves us without a meaningful dump if a real leak happens later, and produces a confusing message that the dump was already generated. Bug: 195319692 Test: presubmit Change-Id: I35932deba0c46ddb27362467109daf74d75cbff4
This commit is contained in:
@@ -126,10 +126,12 @@ public abstract class AbstractLauncherUiTest {
|
||||
private static String getActivityLeakErrorMessage(LauncherInstrumentation launcher) {
|
||||
sActivityLeakReported = true;
|
||||
return "Activity leak detector has found leaked activities, "
|
||||
+ dumpHprofData(launcher) + ".";
|
||||
+ dumpHprofData(launcher, false) + ".";
|
||||
}
|
||||
|
||||
public static String dumpHprofData(LauncherInstrumentation launcher) {
|
||||
public static String dumpHprofData(LauncherInstrumentation launcher, boolean intentionalLeak) {
|
||||
if (intentionalLeak) return "intentional leak; not generating dump";
|
||||
|
||||
String result;
|
||||
if (sDumpWasGenerated) {
|
||||
Log.d("b/195319692", "dump has already been generated by another test",
|
||||
|
||||
Reference in New Issue
Block a user