summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony <twickham@google.com>2019-03-13 10:12:01 -0500
committerTony <twickham@google.com>2019-03-15 17:08:51 -0500
commitd5a3df7b8362b0dd310559877b78dc642c27e014 (patch)
treee9fe0380bc2d77e17b702915e03714a0394934ee /src
parentd082129ef816884f2658c362215c66a35704a3f3 (diff)
downloadandroid_packages_apps_Trebuchet-d5a3df7b8362b0dd310559877b78dc642c27e014.tar.gz
android_packages_apps_Trebuchet-d5a3df7b8362b0dd310559877b78dc642c27e014.tar.bz2
android_packages_apps_Trebuchet-d5a3df7b8362b0dd310559877b78dc642c27e014.zip
Don't close popup container if touch came from nav bar
Moved EDGE_NAV_BAR from quickstep package to launcher3 Bug: 127917144 Change-Id: Ic619ea49896ca8e49a9a539b7dc7d682291241b7
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Utilities.java6
-rw-r--r--src/com/android/launcher3/popup/PopupContainerWithArrow.java4
2 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index 703663915..dd755cb97 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -54,6 +54,7 @@ import android.util.DisplayMetrics;
import android.util.Log;
import android.util.Pair;
import android.util.TypedValue;
+import android.view.MotionEvent;
import android.view.View;
import android.view.animation.Interpolator;
@@ -115,6 +116,11 @@ public final class Utilities {
public static final int SINGLE_FRAME_MS = 16;
/**
+ * Set on a motion event dispatched from the nav bar. See {@link MotionEvent#setEdgeFlags(int)}.
+ */
+ public static final int EDGE_NAV_BAR = 1 << 8;
+
+ /**
* Indicates if the device has a debug build. Should only be used to store additional info or
* add extra logging and not for changing the app behavior.
*/
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
index b0af4c678..10ecc4f04 100644
--- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java
+++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
@@ -22,6 +22,7 @@ import static com.android.launcher3.popup.PopupPopulator.MAX_SHORTCUTS_IF_NOTIFI
import static com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import static com.android.launcher3.userevent.nano.LauncherLogProto.ItemType;
import static com.android.launcher3.userevent.nano.LauncherLogProto.Target;
+import static com.android.launcher3.Utilities.EDGE_NAV_BAR;
import android.animation.AnimatorSet;
import android.animation.LayoutTransition;
@@ -167,7 +168,8 @@ public class PopupContainerWithArrow extends ArrowPopup implements DragSource,
public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
BaseDragLayer dl = getPopupContainer();
- if (!dl.isEventOverView(this, ev)) {
+ final boolean cameFromNavBar = (ev.getEdgeFlags() & EDGE_NAV_BAR) != 0;
+ if (!cameFromNavBar && !dl.isEventOverView(this, ev)) {
mLauncher.getUserEventDispatcher().logActionTapOutside(
LoggerUtils.newContainerTarget(ContainerType.DEEPSHORTCUTS));
close(true);