mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-17 09:38:19 +00:00
Add one null check to tests
Change-Id: Ib4b50ac06d44b1811e0388bc373fe420fa5570fd
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user