Enabling testPressHomeOnAllAppsContextMenu while fixing failure cause
Change-Id: I012d5144651f5e7fb362caaef6eec8cee7622fb4
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
index 05ea694..1ecf443 100644
--- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java
+++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
@@ -169,6 +169,10 @@
@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 54caf1e..a4cd01b 100644
--- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
+++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
@@ -42,7 +42,6 @@
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -122,7 +121,6 @@
}
@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 abd0f24..805523d 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -663,9 +663,7 @@
mDevice.waitForIdle();
if (getNavigationModel() == NavigationModel.TWO_BUTTON) {
- if (hasLauncherObject(CONTEXT_MENU_RES_ID) ||
- hasLauncherObject(WIDGETS_RES_ID)
- && !mDevice.isNaturalOrientation()) {
+ if (hasLauncherObject(WIDGETS_RES_ID) && !mDevice.isNaturalOrientation()) {
expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_PILFER_POINTERS);
}
}