Clean up debug flags and add more screen record

Bug: 193440212
Bug: 194484556
Test: manual
Change-Id: I1b09ae74462c86afb8effb0a2635fd0e70a59bf8
This commit is contained in:
Alex Chau
2021-07-23 15:38:16 +01:00
parent f4afdc4167
commit 261708ba00
4 changed files with 6 additions and 9 deletions

View File

@@ -16,6 +16,7 @@ import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.launcher3.Launcher;
import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
import com.android.quickstep.views.DigitalWellBeingToast;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
@@ -32,6 +33,7 @@ public class DigitalWellBeingToastTest extends AbstractQuickStepTest {
resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR);
@Test
@ScreenRecord //b/193440212
public void testToast() throws Exception {
startAppFast(CALCULATOR_PACKAGE);

View File

@@ -59,6 +59,7 @@ import com.android.launcher3.testcomponent.TestCommandReceiver;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.util.Wait;
import com.android.launcher3.util.rule.FailureWatcher;
import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
import com.android.quickstep.views.RecentsView;
import org.junit.After;
@@ -213,6 +214,7 @@ public class FallbackRecentsTest {
// b/143488140
//@NavigationModeSwitch
@Test
@ScreenRecord // b/194484556
public void testOverview() {
startAppFast(getAppPackageName());
startAppFast(resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR));

View File

@@ -93,7 +93,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
@Test
@PortraitLandscape
@ScreenRecord //b/191344757
@ScreenRecord //b/193440212
public void testOverview() throws Exception {
startTestAppsWithCheck();
// mLauncher.pressHome() also tests an important case of pressing home while in background.
@@ -159,7 +159,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
@Test
@NavigationModeSwitch
@PortraitLandscape
@ScreenRecord //b/191344757
public void testOverviewActions() throws Exception {
// Experimenting for b/165029151:
final Overview overview = mLauncher.pressHome().switchToOverview();
@@ -185,7 +184,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
@Test
@NavigationModeSwitch
@PortraitLandscape
@ScreenRecord //b/191344757
public void testSwitchToOverview() throws Exception {
assertNotNull("Workspace.switchToOverview() returned null",
mLauncher.pressHome().switchToOverview());
@@ -196,7 +194,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
@Test
@NavigationModeSwitch
@PortraitLandscape
@ScreenRecord //b/191344757
public void testBackground() throws Exception {
startAppFast(resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR));
final Background background = getAndAssertBackground();
@@ -218,7 +215,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
@Test
@PortraitLandscape
@ScreenRecord //b/191344757
public void testAllAppsFromHome() throws Exception {
// Test opening all apps
assertNotNull("switchToAllApps() returned null",

View File

@@ -17,8 +17,6 @@ package com.android.launcher3.touch;
import static android.view.MotionEvent.INVALID_POINTER_ID;
import static com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS;
import android.graphics.PointF;
import android.util.Log;
import android.view.MotionEvent;
@@ -43,8 +41,7 @@ import java.util.Queue;
*/
public abstract class BaseSwipeDetector {
// b/193440212: Debug swipe gesture in tests.
private static final boolean DBG = IS_RUNNING_IN_TEST_HARNESS;
private static final boolean DBG = false;
private static final String TAG = "BaseSwipeDetector";
private static final float ANIMATION_DURATION = 1200;
/** The minimum release velocity in pixels per millisecond that triggers fling.*/