Add one null check to tests

Change-Id: Ib4b50ac06d44b1811e0388bc373fe420fa5570fd
This commit is contained in:
vadimt
2019-09-06 18:08:22 -07:00
parent 243dd30da3
commit f083b7741a

View File

@@ -44,8 +44,11 @@ class PortraitLandscapeRunner implements TestRule {
} finally {
mTest.mDevice.setOrientationNatural();
mTest.executeOnLauncher(launcher ->
launcher.getRotationHelper().forceAllowRotationForTesting(
false));
{
if (launcher != null) {
launcher.getRotationHelper().forceAllowRotationForTesting(false);
}
});
mTest.mLauncher.setExpectedRotation(Surface.ROTATION_0);
}
}