diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index de1bb4b9d485b..a0902170f0d6e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -109,6 +109,7 @@ public class NotificationPanelView extends PanelView implements private boolean mBlockTouches; private ArrayList mSwipeTranslationViews = new ArrayList<>(); private int mNotificationScrimWaitDistance; + private boolean mOnNotificationsOnDown; public NotificationPanelView(Context context, AttributeSet attrs) { super(context, attrs); @@ -347,6 +348,7 @@ public class NotificationPanelView extends PanelView implements mInitialTouchX = x; initVelocityTracker(); trackMovement(event); + mOnNotificationsOnDown = isOnNotifications(x, y); if (shouldQuickSettingsIntercept(mInitialTouchX, mInitialTouchY, 0)) { getParent().requestDisallowInterceptTouchEvent(true); } @@ -394,6 +396,8 @@ public class NotificationPanelView extends PanelView implements if (mQsTracking) { flingQsWithCurrentVelocity(); mQsTracking = false; + } else if (mQsFullyExpanded && mOnNotificationsOnDown) { + flingSettings(0 /* vel */, false /* expand */); } mIntercepting = false; break; @@ -401,6 +405,10 @@ public class NotificationPanelView extends PanelView implements return !mQsExpanded && super.onInterceptTouchEvent(event); } + private boolean isOnNotifications(float x, float y) { + return mNotificationStackScroller.getChildAtPosition(x, y) != null; + } + @Override public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) { 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 d956b4fa61bdb..f6e9aefc5b207 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -541,8 +541,9 @@ public class NotificationStackScrollLayout extends ViewGroup if (slidingChild.getVisibility() == GONE) { continue; } - float top = slidingChild.getTranslationY(); - float bottom = top + slidingChild.getActualHeight(); + float childTop = slidingChild.getTranslationY(); + float top = childTop + slidingChild.getClipTopAmount(); + float bottom = childTop + slidingChild.getActualHeight(); int left = slidingChild.getLeft(); int right = slidingChild.getRight();