if (child.getVisibility() != View.GONE
&& child instanceof ExpandableNotificationRow) {
ExpandableNotificationRow row = (ExpandableNotificationRow) child;
- if ((row.isPinned() || row.isHeadsUpAnimatingAway()) && row.getTranslation() < 0) {
+ if ((row.isPinned() || row.isHeadsUpAnimatingAway()) && row.getTranslation() < 0
+ && row.getProvider().shouldShowGutsOnSnapOpen()) {
top = Math.min(top, row.getTranslationY());
bottom = Math.max(bottom, row.getTranslationY() + row.getActualHeight());
}
mStackScrollAlgorithm.setIsExpanded(isExpanded);
mAmbientState.setShadeExpanded(isExpanded);
mStateAnimator.setShadeExpanded(isExpanded);
+ mSwipeHelper.setIsExpanded(isExpanded);
if (changed) {
if (!mIsExpanded) {
mGroupManager.collapseAllGroups();
private static final long SWIPE_MENU_TIMING = 200;
private NotificationMenuRowPlugin mCurrMenuRow;
+ private boolean mIsExpanded;
public NotificationSwipeHelper(int swipeDirection, NotificationCallback callback,
Context context, NotificationMenuRowPlugin.OnMenuEventListener menuListener) {
return mFalsingCheck;
}
+ public void setIsExpanded(boolean isExpanded) {
+ mIsExpanded = isExpanded;
+ }
+
@Override
protected void onChildSnappedBack(View animView, float targetLeft) {
if (mCurrMenuRow != null && targetLeft == 0) {
boolean slowSwipedFarEnough = swipedEnoughToShowMenu(menuRow) && isSlowSwipe;
boolean isFastNonDismissGesture =
gestureFastEnough && !gestureTowardsMenu && !isDismissGesture;
- boolean isMenuRevealingGestureAwayFromMenu = slowSwipedFarEnough || isFastNonDismissGesture;
+ boolean isAbleToShowMenu = menuRow.shouldShowGutsOnSnapOpen() || mIsExpanded;
+ boolean isMenuRevealingGestureAwayFromMenu = slowSwipedFarEnough
+ || (isFastNonDismissGesture && isAbleToShowMenu);
int menuSnapTarget = menuRow.getMenuSnapTarget();
boolean isNonFalseMenuRevealingGesture =
!isFalseGesture(ev) && isMenuRevealingGestureAwayFromMenu;