Checking that there are no more than 2 live activities at any moment
This is tightening the makeshift strictmode criteria. Starting with this moment, we will know that there is no memory growth during tests execution, which is a big deal. Big: 139137636 Change-Id: I5edc84524463bd1736d727496ad0fc031bb9624c
This commit is contained in:
@@ -77,6 +77,8 @@ class ActivityLeakTracker implements Application.ActivityLifecycleCallbacks {
|
||||
}
|
||||
}
|
||||
|
||||
if (liveActivities > 2) return false;
|
||||
|
||||
// It's OK to have 1 leaked activity if no active activities exist.
|
||||
return liveActivities == 0 ? destroyedActivities <= 1 : destroyedActivities == 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user