Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9713651b authored by Mady Mellor's avatar Mady Mellor Committed by Android (Google) Code Review
Browse files

Merge "Make it easier to reveal gear on non-clearable notifications" into nyc-dev

parents aaacd001 fcba959a
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -3639,16 +3639,18 @@ public class NotificationStackScrollLayout extends ViewGroup
            if (mTranslatingParentView == null) {
                return false;
            }
            final float snapBackThreshold = getSpaceForGear(animView);
            // If the notification can't be dismissed then how far it can move is
            // restricted -- reduce the distance it needs to move in this case.
            final float multiplier = canChildBeDismissed(animView) ? 0.4f : 0.2f;
            final float snapBackThreshold = getSpaceForGear(animView) * multiplier;
            final float translation = getTranslation(animView);
            final boolean fromLeft = translation > 0;
            final float absTrans = Math.abs(translation);
            final float notiThreshold = getSize(mTranslatingParentView) * 0.4f;

            // If the notification can't be dismissed then how far it can move is
            // restricted -- reduce the distance it needs to move in this case.
            final float multiplier = canChildBeDismissed(animView) ? 0.4f : 0.2f;
            return absTrans >= snapBackThreshold * 0.4f && absTrans <= notiThreshold;
            return mCurrIconRow.isVisible() && (mCurrIconRow.isIconOnLeft()
                    ? (translation > snapBackThreshold && translation <= notiThreshold)
                    : (translation < -snapBackThreshold && translation >= -notiThreshold));
        }

        @Override