Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 197ae725 authored by vadimt's avatar vadimt
Browse files

Adding debug tracing for All Apps appearing instead of Overview

Bug: 139941530
Change-Id: Ia9827c6edd48c559e9602e1e37de83293517ad5e
parent 6d0d8969
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;

+2 −0
Original line number Diff line number Diff line
@@ -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) {
+7 −0
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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";
}