Update drag-to-open menu close behavior

Menu now closes if the user opens using long-press and then lifts their
finger when touching outside of the menu. This is consistent with the
normal drag-to-open interaction model.

BUG: 16352041
Change-Id: I06aafae7b702ef44000ed19707c46e2bb595095e
This commit is contained in:
Alan Viverette
2014-10-27 16:42:26 -07:00
parent e8d9810cde
commit 99b4e85073

View File

@@ -1252,14 +1252,7 @@ public class ListPopupWindow {
final boolean wasForwarding = mForwarding;
final boolean forwarding;
if (wasForwarding) {
if (mWasLongPress) {
// If we started forwarding as a result of a long-press,
// just silently stop forwarding events so that the window
// stays open.
forwarding = onTouchForwarded(event);
} else {
forwarding = onTouchForwarded(event) || !onForwardingStopped();
}
forwarding = onTouchForwarded(event) || !onForwardingStopped();
} else {
forwarding = onTouchObserved(event) && onForwardingStarted();