Using StrictMode to detect activity leaks

Change-Id: I615f641897d57be0cd31be944796c6931ef9ab00
This commit is contained in:
vadimt
2020-02-25 14:41:01 -08:00
parent d71c3b185d
commit 1779a38290
4 changed files with 45 additions and 1 deletions

View File

@@ -56,6 +56,7 @@ class PortraitLandscapeRunner implements TestRule {
private void evaluateInPortrait() throws Throwable {
mTest.mDevice.setOrientationNatural();
mTest.mLauncher.setExpectedRotation(Surface.ROTATION_0);
AbstractLauncherUiTest.checkDetectedLeaks();
base.evaluate();
mTest.getDevice().pressHome();
}
@@ -63,6 +64,7 @@ class PortraitLandscapeRunner implements TestRule {
private void evaluateInLandscape() throws Throwable {
mTest.mDevice.setOrientationLeft();
mTest.mLauncher.setExpectedRotation(Surface.ROTATION_90);
AbstractLauncherUiTest.checkDetectedLeaks();
base.evaluate();
mTest.getDevice().pressHome();
}