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

Commit e297bc0c authored by Sukesh Ram's avatar Sukesh Ram
Browse files

Cleanup for TAPL Debugging

Cleaning up leftover log statements.

Flag: EXEMPT bugfix
Bug: 326908466
Test: Manual
Change-Id: I01dadc884929a8946f408997ddbcbd0ac4c820ec
parent 24061ff7
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -168,9 +168,7 @@ public final class TestProtocol {
    public static final String PERMANENT_DIAG_TAG = "TaplTarget";
    public static final String ICON_MISSING = "b/282963545";
    public static final String UIOBJECT_STALE_ELEMENT = "b/319501259";
    public static final String TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE = "b/326908466";
    public static final String WIDGET_CONFIG_NULL_EXTRA_INTENT = "b/324419890";

    public static final String REQUEST_FLAG_ENABLE_GRID_ONLY_OVERVIEW = "enable-grid-only-overview";
    public static final String REQUEST_FLAG_ENABLE_APP_PAIRS = "enable-app-pairs";

+0 −6
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
 */
package com.android.launcher3.dragging;

import static com.android.launcher3.testing.shared.TestProtocol.TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE;
import static com.android.launcher3.util.TestConstants.AppNames.GMAIL_APP_NAME;
import static com.android.launcher3.util.TestConstants.AppNames.MAPS_APP_NAME;
import static com.android.launcher3.util.TestConstants.AppNames.PHOTOS_APP_NAME;
@@ -229,11 +228,6 @@ public class TaplDragTest extends AbstractLauncherUiTest<Launcher> {
        final HomeAppIcon launcherTestAppIcon = createShortcutInCenterIfNotExist(TEST_APP_NAME);
        for (Point target : targets) {
            startTime = SystemClock.uptimeMillis();
            Log.d(TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE,
                    "TaplDragTest.java.testDragAppIconToMultipleWorkspaceCells: shortcut name: "
                            + launcherTestAppIcon.getIconName()
                            + " | target cell coordinates: (" + target.x + ", " + target.y
                            + ") | start time: " + startTime);
            launcherTestAppIcon.dragToWorkspace(target.x, target.y);
            endTime = SystemClock.uptimeMillis();
            elapsedTime = endTime - startTime;
+0 −4
Original line number Diff line number Diff line
@@ -16,10 +16,8 @@

package com.android.launcher3.tapl;

import static com.android.launcher3.testing.shared.TestProtocol.TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE;

import android.graphics.Point;
import android.util.Log;
import android.widget.TextView;

import androidx.annotation.NonNull;
@@ -99,8 +97,6 @@ public abstract class AppIcon extends Launchable {

    @Override
    protected void waitForLongPressConfirmation() {
        Log.d(TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE,
                "AppIcon.waitForLongPressConfirmation, resName: popupContainer");
        mLauncher.waitForLauncherObject("popup_container");
    }

+0 −6
Original line number Diff line number Diff line
@@ -17,10 +17,8 @@
package com.android.launcher3.tapl;

import static com.android.launcher3.testing.shared.TestProtocol.SPRING_LOADED_STATE_ORDINAL;
import static com.android.launcher3.testing.shared.TestProtocol.TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE;

import android.graphics.Point;
import android.util.Log;
import android.view.MotionEvent;

import androidx.test.uiautomator.UiObject2;
@@ -115,10 +113,6 @@ public abstract class Launchable {
                iconCenter.y - getStartDragThreshold());

        if (runToSpringLoadedState) {
            Log.d(TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE,
                    "Launchable.startDrag: actionName: long-pressing and triggering drag start"
                            + " iconCenter: " + iconCenter + " dragStartCenter: "
                            + dragStartCenter);
            mLauncher.runToState(() -> movePointerForStartDrag(
                            downTime,
                            iconCenter,
+0 −19
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import static com.android.launcher3.tapl.TestHelpers.getOverviewPackageName;
import static com.android.launcher3.testing.shared.TestProtocol.NORMAL_STATE_ORDINAL;
import static com.android.launcher3.testing.shared.TestProtocol.REQUEST_GET_SPLIT_SELECTION_ACTIVE;
import static com.android.launcher3.testing.shared.TestProtocol.REQUEST_NUM_ALL_APPS_COLUMNS;
import static com.android.launcher3.testing.shared.TestProtocol.TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE;
import static com.android.launcher3.testing.shared.TestProtocol.TEST_INFO_RESPONSE_FIELD;

import android.app.ActivityManager;
@@ -1212,11 +1211,6 @@ public final class LauncherInstrumentation {
                log("Hierarchy before clicking home:");
                dumpViewHierarchy();
                action = "clicking home button";
                Log.d(TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE,
                        "LauncherInstrumentation.goHome: isThreeFingerTrackpadGesture: "
                                + isThreeFingerTrackpadGesture
                                + "getNavigationModel() == NavigationModel.ZERO_BUTTON: " + (
                                getNavigationModel() == NavigationModel.ZERO_BUTTON));
                runToState(
                        getHomeButton()::click,
                        NORMAL_STATE_ORDINAL,
@@ -1567,8 +1561,6 @@ public final class LauncherInstrumentation {

    @NonNull
    UiObject2 waitForLauncherObject(String resName) {
        Log.d(TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE,
                "LauncherInstrumentation.waitForLauncherObject");
        return waitForObjectBySelector(getLauncherObjectSelector(resName));
    }

@@ -1598,16 +1590,12 @@ public final class LauncherInstrumentation {

    @NonNull
    List<UiObject2> waitForObjectsBySelector(BySelector selector) {
        Log.d(TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE,
                "LauncherInstrumentation.waitForObjectsBySelector");
        final List<UiObject2> objects = mDevice.wait(Until.findObjects(selector), WAIT_TIME_MS);
        assertNotNull("Can't find any view in Launcher, selector: " + selector, objects);
        return objects;
    }

    UiObject2 waitForObjectBySelector(BySelector selector) {
        Log.d(TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE,
                "LauncherInstrumentation.waitForObjectBySelector");
        final UiObject2 object = mDevice.wait(Until.findObject(selector), WAIT_TIME_MS);
        assertNotNull("Can't find a view in Launcher, selector: " + selector, object);
        return object;
@@ -1650,9 +1638,6 @@ public final class LauncherInstrumentation {

    void runToState(Runnable command, int expectedState, boolean requireEvent, String actionName) {
        if (requireEvent) {
            Log.d(TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE,
                    "LauncherInstrumentation.runToState: command: " + command + " expectedState: "
                            + expectedState + " actionName: " + actionName + "requireEvent: true");
            runToState(command, expectedState, actionName);
        } else {
            command.run();
@@ -2052,15 +2037,11 @@ public final class LauncherInstrumentation {
                    mPointerCount = 1;
                    pointerCount = mPointerCount;
                }
                Log.d(TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE,
                        "LauncherInstrumentation.sendPointer: ACTION_DOWN");
                break;
            case MotionEvent.ACTION_UP:
                if (hasTIS && gestureScope == GestureScope.EXPECT_PILFER) {
                    expectEvent(TestProtocol.SEQUENCE_PILFER, EVENT_PILFER_POINTERS);
                }
                Log.d(TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE,
                        "LauncherInstrumentation.sendPointer: ACTION_UP");
                break;
            case MotionEvent.ACTION_POINTER_DOWN:
                mPointerCount++;
Loading