Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +16 −4 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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++) { Loading @@ -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; Loading Loading @@ -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; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +16 −4 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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++) { Loading @@ -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; Loading Loading @@ -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; Loading