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

Commit 3f8eea99 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias
Browse files

Remove debug tracing for b/321775748

Flag: N/A
Fixes: 321775748
Test: FallbackRecentsTest
Change-Id: I1f746bf43025e093e94e60f8a1561f4f6a0f9b22
parent 2fb15b12
Loading
Loading
Loading
Loading
+1 −31
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import static androidx.test.InstrumentationRegistry.getInstrumentation;
import static com.android.launcher3.tapl.LauncherInstrumentation.WAIT_TIME_MS;
import static com.android.launcher3.tapl.TestHelpers.getHomeIntentInPackage;
import static com.android.launcher3.tapl.TestHelpers.getLauncherInMyProcess;
import static com.android.launcher3.testing.shared.TestProtocol.UPDATE_OVERVIEW_TARGETS_RUNNING_LATE;
import static com.android.launcher3.ui.AbstractLauncherUiTest.DEFAULT_ACTIVITY_TIMEOUT;
import static com.android.launcher3.ui.AbstractLauncherUiTest.DEFAULT_BROADCAST_TIMEOUT_SECS;
import static com.android.launcher3.ui.AbstractLauncherUiTest.DEFAULT_UI_TIMEOUT;
@@ -43,7 +42,6 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.RemoteException;
import android.util.Log;

import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
@@ -116,8 +114,6 @@ public class FallbackRecentsTest {
        mDevice.setOrientationNatural();
        mLauncher = AbstractLauncherUiTest.createLauncherInstrumentation();
        mLauncher.enableDebugTracing();
        // b/143488140
        //mLauncher.enableCheckEventsForSuccessfulGestures();

        if (TestHelpers.isInLauncherProcess()) {
            Utilities.enableRunningInTestHarnessForTests();
@@ -133,13 +129,6 @@ public class FallbackRecentsTest {
                        getLauncherCommand(mOtherLauncherActivity));
                updateHandler.mChangeCounter
                        .await(DEFAULT_BROADCAST_TIMEOUT_SECS, TimeUnit.SECONDS);
                Log.d(UPDATE_OVERVIEW_TARGETS_RUNNING_LATE,
                        "AFTER AWAIT: mObserver home intent package name="
                                + updateHandler.mObserver.getHomeIntent()
                                        .getComponent().getPackageName());
                Log.d(UPDATE_OVERVIEW_TARGETS_RUNNING_LATE,
                        "AFTER AWAIT: mOtherLauncherActivity package name="
                                + mOtherLauncherActivity.packageName);
                try {
                    base.evaluate();
                } finally {
@@ -147,7 +136,6 @@ public class FallbackRecentsTest {
                    TestCommandReceiver.callCommand(TestCommandReceiver.DISABLE_TEST_LAUNCHER);
                    UiDevice.getInstance(getInstrumentation()).executeShellCommand(
                            getLauncherCommand(getLauncherInMyProcess()));
                    // b/143488140
                    pressHomeAndWaitForOverviewClose();
                }
            }
@@ -191,8 +179,6 @@ public class FallbackRecentsTest {
        }
    }

    // b/143488140
    //@NavigationModeSwitch
    @Test
    public void goToOverviewFromHome() {
        mDevice.pressHome();
@@ -261,10 +247,7 @@ public class FallbackRecentsTest {
                DEFAULT_UI_TIMEOUT, mLauncher);
    }

    // b/143488140
    //@NavigationModeSwitch
    @Test
    @ScreenRecordRule.ScreenRecord // b/321775748
    public void testOverview() throws IOException {
        startAppFast(getAppPackageName());
        startAppFast(resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR));
@@ -348,25 +331,12 @@ public class FallbackRecentsTest {
            mRads = new RecentsAnimationDeviceState(ctx);
            mObserver = new OverviewComponentObserver(ctx, mRads);
            mChangeCounter = new CountDownLatch(1);
            Log.d(UPDATE_OVERVIEW_TARGETS_RUNNING_LATE,
                    "OverviewUpdateHandler(Constructor): mObserver home intent package name="
                            + mObserver.getHomeIntent().getComponent().getPackageName());
            Log.d(UPDATE_OVERVIEW_TARGETS_RUNNING_LATE,
                    "OverviewUpdateHandler(Constructor): mOtherLauncherActivity package name="
                            + mOtherLauncherActivity.packageName);
            if (mObserver.getHomeIntent().getComponent()
                    .getPackageName().equals(mOtherLauncherActivity.packageName)) {
                // Home already same
                mChangeCounter.countDown();
            } else {
                mObserver.setOverviewChangeListener(b -> {
                    Log.d(UPDATE_OVERVIEW_TARGETS_RUNNING_LATE,
                            "OverviewChangeListener(Callback): isHomeAndOverviewSame=" + b);
                    Log.d(UPDATE_OVERVIEW_TARGETS_RUNNING_LATE,
                            "OverviewChangeListener(Callback): mObserver home intent package name="
                                    + mObserver.getHomeIntent().getComponent().getPackageName());
                    mChangeCounter.countDown();
                });
                mObserver.setOverviewChangeListener(b -> mChangeCounter.countDown());
            }
        }

+0 −1
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ public class TaplStartLauncherViaGestureTests extends AbstractQuickStepTest {
    @Before
    public void setUp() throws Exception {
        super.setUp();
        // b/143488140
        mLauncher.goHome();
        // Start an activity where the gestures start.
        startTestActivity(2);
+0 −8
Original line number Diff line number Diff line
@@ -15,9 +15,6 @@
 */
package com.android.launcher3.util;

import static com.android.launcher3.testing.shared.TestProtocol.GET_FROM_RECENTS_FAILURE;
import static com.android.launcher3.testing.shared.TestProtocol.testLogD;

import android.util.Log;

import androidx.annotation.Nullable;
@@ -46,9 +43,6 @@ public final class ActivityTracker<T extends BaseActivity> {

    public void onActivityDestroyed(T activity) {
        if (mCurrentActivity.get() == activity) {
            testLogD(GET_FROM_RECENTS_FAILURE,
                    String.format("ActivityTracker.onActivityDestroyed this=%s, activity=%s",
                            this, activity));
            mCurrentActivity.clear();
        }
    }
@@ -82,8 +76,6 @@ public final class ActivityTracker<T extends BaseActivity> {
    }

    public boolean handleCreate(T activity) {
        testLogD(GET_FROM_RECENTS_FAILURE,
                String.format("ActivityTracker.handleCreate this=%s, activity=%s", this, activity));
        mCurrentActivity = new WeakReference<>(activity);
        return handleIntent(activity, false /* alreadyOnHome */);
    }
+0 −2
Original line number Diff line number Diff line
@@ -174,13 +174,11 @@ public final class TestProtocol {
    public static final String ICON_MISSING = "b/282963545";
    public static final String OVERVIEW_OVER_HOME = "b/279059025";
    public static final String UIOBJECT_STALE_ELEMENT = "b/319501259";
    public static final String GET_FROM_RECENTS_FAILURE = "b/321775748";
    public static final String SUCCESSFUL_GESTURE_MISMATCH_EVENTS = "b/324940434";
    public static final String TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE = "b/326908466";
    public static final String TEST_TAPL_OVERVIEW_ACTIONS_MENU_FAILURE = "b/326073471";
    public static final String WIDGET_CONFIG_NULL_EXTRA_INTENT = "b/324419890";
    public static final String ACTIVITY_NOT_RESUMED_AFTER_BACK = "b/322823209";
    public static final String UPDATE_OVERVIEW_TARGETS_RUNNING_LATE = "b/321775748";

    public static final String REQUEST_EMULATE_DISPLAY = "emulate-display";
    public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display";