Add one null check to tests

am: f083b7741a

Change-Id: Id2e678bfb216302ef93e593a210edefe5092772a
This commit is contained in:
vadimt
2019-09-09 14:17:56 -07:00
committed by android-build-merger
@@ -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);
}
}