Infer launcher rotation when initializing RecentsOrientedState

fixes: 154776599
Change-Id: I9b95f7f96836a974be0fd1236547efb4b405fda5
This commit is contained in:
Vinit Nayak committed 2020-05-11 11:23:49 -07:00
1 parent 144f638fa3
commit b9522d334a
5 files changed
+87 -59

No files matched your search

@@ -42,6 +42,7 @@ import com.android.launcher3.ui.TaplTestsLauncher3;
import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch;
import com.android.quickstep.views.RecentsView;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -53,6 +54,18 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
public void setUp() throws Exception {
super.setUp();
TaplTestsLauncher3.initialize(this);
executeOnLauncher(launcher -> {
RecentsView recentsView = launcher.getOverviewPanel();
recentsView.getPagedViewOrientedState().forceAllowRotationForTesting(true);
});
}
@After
public void tearDown() {
executeOnLauncher(launcher -> {
RecentsView recentsView = launcher.getOverviewPanel();
recentsView.getPagedViewOrientedState().forceAllowRotationForTesting(false);
});
}
private void startTestApps() throws Exception {