Merge "Clean up test logging and ScreenRecord" into sc-v2-dev am: 662af98956

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15542317

Change-Id: I53ccca4501c95f942c71959bbf22c55dcb59c2bd
This commit is contained in:
TreeHugger Robot
2021-08-12 18:20:47 +00:00
committed by Automerger Merge Worker
3 changed files with 1 additions and 16 deletions
@@ -17,7 +17,6 @@ package com.android.quickstep.util;
import android.content.Context;
import android.content.res.Resources;
import android.util.Log;
import android.view.MotionEvent;
import android.view.VelocityTracker;
@@ -86,12 +85,7 @@ public class MotionPauseDetector {
mSpeedSomewhatFast = res.getDimension(R.dimen.motion_pause_detector_speed_somewhat_fast);
mSpeedFast = res.getDimension(R.dimen.motion_pause_detector_speed_fast);
mForcePauseTimeout = new Alarm();
mForcePauseTimeout.setOnAlarmListener(alarm -> {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MOTION_PAUSE_TIMEOUT, "onAlarm");
}
updatePaused(true /* isPaused */);
});
mForcePauseTimeout.setOnAlarmListener(alarm -> updatePaused(true /* isPaused */));
mMakePauseHarderToTrigger = makePauseHarderToTrigger;
mVelocityProvider = new SystemVelocityProvider(axis);
}
@@ -128,9 +122,6 @@ public class MotionPauseDetector {
long timeoutMs = TestProtocol.sForcePauseTimeout != null
? TestProtocol.sForcePauseTimeout
: mMakePauseHarderToTrigger ? HARDER_TRIGGER_TIMEOUT : FORCE_PAUSE_TIMEOUT;
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MOTION_PAUSE_TIMEOUT, "setAlarm: " + timeoutMs);
}
mForcePauseTimeout.setAlarm(timeoutMs);
float newVelocity = mVelocityProvider.addMotionEvent(ev, ev.getPointerId(pointerIndex));
if (mPreviousVelocity != null) {
@@ -172,9 +163,6 @@ public class MotionPauseDetector {
}
}
}
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MOTION_PAUSE_TIMEOUT, "checkMotionPaused: " + isPaused);
}
updatePaused(isPaused);
}
@@ -37,7 +37,6 @@ import com.android.launcher3.tapl.Overview;
import com.android.launcher3.tapl.OverviewActions;
import com.android.launcher3.tapl.OverviewTask;
import com.android.launcher3.ui.TaplTestsLauncher3;
import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch;
import com.android.quickstep.views.RecentsView;
@@ -158,7 +157,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
@Test
@NavigationModeSwitch
@PortraitLandscape
@ScreenRecord //b/193125090
public void testOverviewActions() throws Exception {
// Experimenting for b/165029151:
final Overview overview = mLauncher.pressHome().switchToOverview();
@@ -118,6 +118,5 @@ public final class TestProtocol {
public static final String WORK_PROFILE_REMOVED = "b/159671700";
public static final String FALLBACK_ACTIVITY_NO_SET = "b/181019015";
public static final String THIRD_PARTY_LAUNCHER_NOT_SET = "b/187080582";
public static final String MOTION_PAUSE_TIMEOUT = "b/194114179";
public static final String TASK_VIEW_ID_CRASH = "b/195430732";
}