Add some logging for transposed mode in landscape

Bug: 185820525
Test: Presubmit
Change-Id: Id4cf605fd5c3277273025ac1a73f25add0608412
This commit is contained in:
Winson Chung
2021-04-20 20:38:04 +00:00
parent 426bcc7715
commit 8e64bba9cf
6 changed files with 32 additions and 1 deletions
@@ -4,6 +4,7 @@ import android.util.Log;
import android.view.Surface;
import com.android.launcher3.tapl.TestHelpers;
import com.android.launcher3.testing.TestProtocol;
import org.junit.rules.TestRule;
import org.junit.runner.Description;
@@ -54,19 +55,23 @@ class PortraitLandscapeRunner implements TestRule {
}
private void evaluateInPortrait() throws Throwable {
Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "evaluateInPortrait");
mTest.mDevice.setOrientationNatural();
mTest.mLauncher.setExpectedRotation(Surface.ROTATION_0);
AbstractLauncherUiTest.checkDetectedLeaks(mTest.mLauncher);
base.evaluate();
mTest.getDevice().pressHome();
Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "evaluateInPortrait finished");
}
private void evaluateInLandscape() throws Throwable {
Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "evaluateInLandscape");
mTest.mDevice.setOrientationLeft();
mTest.mLauncher.setExpectedRotation(Surface.ROTATION_90);
AbstractLauncherUiTest.checkDetectedLeaks(mTest.mLauncher);
base.evaluate();
mTest.getDevice().pressHome();
Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "evaluateInLandscape finished");
}
};
}