From 47b3588ba5c6b19c92da348295a26e30c6e91b63 Mon Sep 17 00:00:00 2001 From: Vadim Tryshev Date: Sat, 15 Feb 2020 02:25:35 +0000 Subject: [PATCH] Revert "Enabling testPressHomeOnAllAppsContextMenu while fixing failure cause" This reverts commit c2842d8f4acd952084ffc02c70d07e2c7d381da5. Reason for revert: CL broke TaplTestsLauncher3.testDevicePressMenu in 2-button mode Change-Id: Idebda69a36b94686415434e8e3f158a8a7abc5bb --- src/com/android/launcher3/popup/PopupContainerWithArrow.java | 4 ---- tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java | 2 ++ .../com/android/launcher3/tapl/LauncherInstrumentation.java | 4 +++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java index 1ecf44371d..05ea694d6f 100644 --- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java +++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java @@ -169,10 +169,6 @@ public class PopupContainerWithArrow extends Arr @Override public boolean onControllerInterceptTouchEvent(MotionEvent ev) { - if (ev.getY() > (mLauncher.getDragLayer().getHeight() - - mLauncher.getDeviceProfile().getInsets().bottom)) { - return false; - } if (ev.getAction() == MotionEvent.ACTION_DOWN) { BaseDragLayer dl = getPopupContainer(); if (!dl.isEventOverView(this, ev)) { diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java index a4cd01ba51..54caf1e37b 100644 --- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java +++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java @@ -42,6 +42,7 @@ import com.android.launcher3.widget.WidgetsRecyclerView; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -121,6 +122,7 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest { } @Test + @Ignore public void testPressHomeOnAllAppsContextMenu() throws Exception { final AllApps allApps = mLauncher.getWorkspace().switchToAllApps(); allApps.freeze(); diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 805523d5d9..abd0f24a38 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -663,7 +663,9 @@ public final class LauncherInstrumentation { mDevice.waitForIdle(); if (getNavigationModel() == NavigationModel.TWO_BUTTON) { - if (hasLauncherObject(WIDGETS_RES_ID) && !mDevice.isNaturalOrientation()) { + if (hasLauncherObject(CONTEXT_MENU_RES_ID) || + hasLauncherObject(WIDGETS_RES_ID) + && !mDevice.isNaturalOrientation()) { expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_PILFER_POINTERS); } }