Clean up debug flags and add more screen record
Bug: 193440212
Bug: 194484556
Test: manual
Change-Id: I1b09ae74462c86afb8effb0a2635fd0e70a59bf8
diff --git a/quickstep/tests/src/com/android/quickstep/DigitalWellBeingToastTest.java b/quickstep/tests/src/com/android/quickstep/DigitalWellBeingToastTest.java
index 3e84a76..fef9304 100644
--- a/quickstep/tests/src/com/android/quickstep/DigitalWellBeingToastTest.java
+++ b/quickstep/tests/src/com/android/quickstep/DigitalWellBeingToastTest.java
@@ -16,6 +16,7 @@
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 @@
resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR);
@Test
+ @ScreenRecord //b/193440212
public void testToast() throws Exception {
startAppFast(CALCULATOR_PACKAGE);
diff --git a/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java b/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java
index a683d01..20b4715 100644
--- a/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java
+++ b/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java
@@ -59,6 +59,7 @@
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 @@
// b/143488140
//@NavigationModeSwitch
@Test
+ @ScreenRecord // b/194484556
public void testOverview() {
startAppFast(getAppPackageName());
startAppFast(resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR));
diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
index c14a590..ea69b94 100644
--- a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
+++ b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
@@ -93,7 +93,7 @@
@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 @@
@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 @@
@Test
@NavigationModeSwitch
@PortraitLandscape
- @ScreenRecord //b/191344757
public void testSwitchToOverview() throws Exception {
assertNotNull("Workspace.switchToOverview() returned null",
mLauncher.pressHome().switchToOverview());
@@ -196,7 +194,6 @@
@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 @@
@Test
@PortraitLandscape
- @ScreenRecord //b/191344757
public void testAllAppsFromHome() throws Exception {
// Test opening all apps
assertNotNull("switchToAllApps() returned null",
diff --git a/src/com/android/launcher3/touch/BaseSwipeDetector.java b/src/com/android/launcher3/touch/BaseSwipeDetector.java
index cfd3153..1276ece 100644
--- a/src/com/android/launcher3/touch/BaseSwipeDetector.java
+++ b/src/com/android/launcher3/touch/BaseSwipeDetector.java
@@ -17,8 +17,6 @@
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 @@
*/
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.*/