summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index 4e592dbed322..75532d9e09be 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -23,14 +23,12 @@ import android.animation.PropertyValuesHolder;
import android.animation.TimeAnimator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
-import android.annotation.ColorInt;
import android.annotation.FloatRange;
import android.annotation.Nullable;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Canvas;
-import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PointF;
import android.graphics.PorterDuff;
@@ -1083,6 +1081,20 @@ public class NotificationStackScrollLayout extends ViewGroup
@Override
public ExpandableView getChildAtPosition(float touchX, float touchY) {
+ return getChildAtPosition(touchX, touchY, true /* requireMinHeight */);
+
+ }
+
+ /**
+ * Get the child at a certain screen location.
+ *
+ * @param touchX the x coordinate
+ * @param touchY the y coordinate
+ * @param requireMinHeight Whether a minimum height is required for a child to be returned.
+ * @return the child at the given location.
+ */
+ private ExpandableView getChildAtPosition(float touchX, float touchY,
+ boolean requireMinHeight) {
// find the view under the pointer, accounting for GONE views
final int count = getChildCount();
for (int childIdx = 0; childIdx < count; childIdx++) {
@@ -1101,7 +1113,7 @@ public class NotificationStackScrollLayout extends ViewGroup
int left = 0;
int right = getWidth();
- if (bottom - top >= mMinInteractionHeight
+ if ((bottom - top >= mMinInteractionHeight || !requireMinHeight)
&& touchY >= top && touchY <= bottom && touchX >= left && touchX <= right) {
if (slidingChild instanceof ExpandableNotificationRow) {
ExpandableNotificationRow row = (ExpandableNotificationRow) slidingChild;
@@ -3220,7 +3232,7 @@ public class NotificationStackScrollLayout extends ViewGroup
case MotionEvent.ACTION_DOWN: {
final int y = (int) ev.getY();
mScrolledToTopOnFirstDown = isScrolledToTop();
- if (getChildAtPosition(ev.getX(), y) == null) {
+ if (getChildAtPosition(ev.getX(), y, false /* requireMinHeight */) == null) {
setIsBeingDragged(false);
recycleVelocityTracker();
break;