Adding debug tracing for All Apps appearing instead of Overview

Bug: 139941530
Change-Id: Ia9827c6edd48c559e9602e1e37de83293517ad5e
This commit is contained in:
vadimt
2019-08-23 12:11:00 -07:00
parent 6d0d8969f6
commit 197ae725a0
4 changed files with 15 additions and 0 deletions

View File

@@ -25,11 +25,13 @@ import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.os.SystemClock;
import android.util.Log;
import android.view.ViewConfiguration;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.MainThreadExecutor;
import com.android.launcher3.logging.UserEventDispatcher;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.quickstep.ActivityControlHelper.ActivityInitListener;
import com.android.quickstep.views.RecentsView;
@@ -162,6 +164,9 @@ public class OverviewCommandHelper {
@Override
public void run() {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.ALL_APPS_UPON_RECENTS, "RecentsActivityCommand.run");
}
long elapsedTime = mCreateTime - mLastToggleTime;
mLastToggleTime = mCreateTime;

View File

@@ -97,6 +97,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
@Test
@PortraitLandscape
public void testOverview() throws Exception {
mLauncher.enableDebugTracing();
startTestApps();
Overview overview = mLauncher.pressHome().switchToOverview();
assertTrue("Launcher internal state didn't switch to Overview",
@@ -176,6 +177,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
executeOnLauncher(
launcher -> assertEquals("Still have tasks after dismissing all",
0, getTaskCount(launcher)));
mLauncher.disableDebugTracing();
}
private int getCurrentOverviewPage(Launcher launcher) {

View File

@@ -227,6 +227,10 @@ public class LauncherStateManager {
private void goToState(LauncherState state, boolean animated, long delay,
final Runnable onCompleteRunnable) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.ALL_APPS_UPON_RECENTS, "goToState: " + state + " @ " +
Log.getStackTraceString(new Throwable()));
}
animated &= Utilities.areAnimationsEnabled(mLauncher);
if (mLauncher.isInState(state)) {
if (mConfig.mCurrentAnimation == null) {
@@ -426,6 +430,9 @@ public class LauncherStateManager {
if (state != mCurrentStableState) {
mLastStableState = state.getHistoryForState(mCurrentStableState);
mCurrentStableState = state;
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.ALL_APPS_UPON_RECENTS, "onStateTransitionEnd: " + state);
}
}
state.onStateTransitionEnd(mLauncher);

View File

@@ -82,4 +82,5 @@ public final class TestProtocol {
public static final String NO_BACKGROUND_TO_OVERVIEW_TAG = "b/138251824";
public static final String NO_DRAG_TO_WORKSPACE = "b/138729456";
public static final String APP_NOT_DISABLED = "b/139891609";
public static final String ALL_APPS_UPON_RECENTS = "b/139941530";
}