Add one null check to tests am: f083b7741a

am: 83775e28f6

Change-Id: I93c7d0dd0cc2bf0c41824a090e1cf50375453acb
This commit is contained in:
vadimt 2019-09-09 14:24:05 -07:00 committed by android-build-merger
commit d9144ef07e
1 changed files with 5 additions and 2 deletions

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);
}
}