diff --git a/src/com/android/launcher3/touch/ItemLongClickListener.java b/src/com/android/launcher3/touch/ItemLongClickListener.java index bee78534c3..ba1bfa597b 100644 --- a/src/com/android/launcher3/touch/ItemLongClickListener.java +++ b/src/com/android/launcher3/touch/ItemLongClickListener.java @@ -33,7 +33,6 @@ import com.android.launcher3.Launcher; import com.android.launcher3.dragndrop.DragController; import com.android.launcher3.dragndrop.DragOptions; import com.android.launcher3.folder.Folder; -import com.android.launcher3.testing.TestLogging; /** * Class to handle long-clicks on workspace items and start drag as a result. @@ -47,7 +46,6 @@ public class ItemLongClickListener { ItemLongClickListener::onAllAppsItemLongClick; private static boolean onWorkspaceItemLongClick(View v) { - TestLogging.recordEvent("onWorkspaceItemLongClick"); Launcher launcher = Launcher.getLauncher(v.getContext()); if (!canStartDrag(launcher)) return false; if (!launcher.isInState(NORMAL) && !launcher.isInState(OVERVIEW)) return false; @@ -77,7 +75,6 @@ public class ItemLongClickListener { } private static boolean onAllAppsItemLongClick(View v) { - TestLogging.recordEvent("onAllAppsItemLongClick"); Launcher launcher = Launcher.getLauncher(v.getContext()); if (!canStartDrag(launcher)) return false; // When we have exited all apps or are in transition, disregard long clicks diff --git a/src/com/android/launcher3/touch/WorkspaceTouchListener.java b/src/com/android/launcher3/touch/WorkspaceTouchListener.java index 61ce046bd9..310d598b25 100644 --- a/src/com/android/launcher3/touch/WorkspaceTouchListener.java +++ b/src/com/android/launcher3/touch/WorkspaceTouchListener.java @@ -38,7 +38,6 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.Launcher; import com.android.launcher3.Workspace; import com.android.launcher3.dragndrop.DragLayer; -import com.android.launcher3.testing.TestLogging; import com.android.launcher3.views.OptionsPopupView; import com.android.launcher3.userevent.nano.LauncherLogProto.Action; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; @@ -166,7 +165,6 @@ public class WorkspaceTouchListener extends GestureDetector.SimpleOnGestureListe @Override public void onLongPress(MotionEvent event) { - TestLogging.recordEvent("Workspace.longPress"); if (mLongPressState == STATE_REQUESTED) { if (canHandleLongPress()) { mLongPressState = STATE_PENDING_PARENT_INFORM; diff --git a/src/com/android/launcher3/widget/BaseWidgetSheet.java b/src/com/android/launcher3/widget/BaseWidgetSheet.java index 3758cb8040..6cae43da9e 100644 --- a/src/com/android/launcher3/widget/BaseWidgetSheet.java +++ b/src/com/android/launcher3/widget/BaseWidgetSheet.java @@ -35,7 +35,6 @@ import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.dragndrop.DragOptions; import com.android.launcher3.popup.PopupDataProvider; -import com.android.launcher3.testing.TestLogging; import com.android.launcher3.touch.ItemLongClickListener; import com.android.launcher3.uioverrides.WallpaperColorInfo; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; @@ -91,7 +90,6 @@ abstract class BaseWidgetSheet extends AbstractSlideInView @Override public boolean onLongClick(View v) { - TestLogging.recordEvent("Widgets.onLongClick"); if (!ItemLongClickListener.canStartDrag(mLauncher)) return false; if (v instanceof WidgetCell) { diff --git a/tests/tapl/com/android/launcher3/tapl/AppIcon.java b/tests/tapl/com/android/launcher3/tapl/AppIcon.java index bf68f711c0..db685dbb2f 100644 --- a/tests/tapl/com/android/launcher3/tapl/AppIcon.java +++ b/tests/tapl/com/android/launcher3/tapl/AppIcon.java @@ -22,15 +22,11 @@ import androidx.test.uiautomator.By; import androidx.test.uiautomator.BySelector; import androidx.test.uiautomator.UiObject2; -import java.util.regex.Pattern; - /** * App icon, whether in all apps or in workspace/ */ public final class AppIcon extends Launchable { - private static final Pattern LONG_CLICK_EVENT = Pattern.compile("onAllAppsItemLongClick"); - AppIcon(LauncherInstrumentation launcher, UiObject2 icon) { super(launcher, icon); } @@ -47,11 +43,6 @@ public final class AppIcon extends Launchable { mObject, "deep_shortcuts_container")); } - @Override - protected void addExpectedEventsForLongClick() { - mLauncher.expectEvent(LONG_CLICK_EVENT); - } - @Override protected String getLongPressIndicator() { return "deep_shortcuts_container"; diff --git a/tests/tapl/com/android/launcher3/tapl/AppIconMenuItem.java b/tests/tapl/com/android/launcher3/tapl/AppIconMenuItem.java index 597be90412..ba9c10e817 100644 --- a/tests/tapl/com/android/launcher3/tapl/AppIconMenuItem.java +++ b/tests/tapl/com/android/launcher3/tapl/AppIconMenuItem.java @@ -33,10 +33,6 @@ public class AppIconMenuItem extends Launchable { return mObject.getText(); } - @Override - protected void addExpectedEventsForLongClick() { - } - @Override protected String getLongPressIndicator() { return "drop_target_bar"; diff --git a/tests/tapl/com/android/launcher3/tapl/Launchable.java b/tests/tapl/com/android/launcher3/tapl/Launchable.java index 9327cb3a4b..3aedf99a1c 100644 --- a/tests/tapl/com/android/launcher3/tapl/Launchable.java +++ b/tests/tapl/com/android/launcher3/tapl/Launchable.java @@ -73,7 +73,6 @@ abstract class Launchable { final Point launchableCenter = getObject().getVisibleCenter(); final Point displaySize = mLauncher.getRealDisplaySize(); final int width = displaySize.x / 2; - addExpectedEventsForLongClick(); Workspace.dragIconToWorkspace( mLauncher, this, @@ -86,7 +85,5 @@ abstract class Launchable { } } - protected abstract void addExpectedEventsForLongClick(); - protected abstract String getLongPressIndicator(); } diff --git a/tests/tapl/com/android/launcher3/tapl/Widget.java b/tests/tapl/com/android/launcher3/tapl/Widget.java index e0db16d77a..dfd74ed0fa 100644 --- a/tests/tapl/com/android/launcher3/tapl/Widget.java +++ b/tests/tapl/com/android/launcher3/tapl/Widget.java @@ -18,15 +18,11 @@ package com.android.launcher3.tapl; import androidx.test.uiautomator.UiObject2; -import java.util.regex.Pattern; - /** * Widget in workspace or a widget list. */ public final class Widget extends Launchable { - private static final Pattern LONG_CLICK_EVENT = Pattern.compile("Widgets.onLongClick"); - Widget(LauncherInstrumentation launcher, UiObject2 icon) { super(launcher, icon); } @@ -35,9 +31,4 @@ public final class Widget extends Launchable { protected String getLongPressIndicator() { return "drop_target_bar"; } - - @Override - protected void addExpectedEventsForLongClick() { - mLauncher.expectEvent(LONG_CLICK_EVENT); - } }