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

Commit 3c0e7d5b authored by Mady Mellor's avatar Mady Mellor Committed by android-build-merger
Browse files

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

am: 9713651b

* commit '9713651b':
  Make it easier to reveal gear on non-clearable notifications

Change-Id: I5da46acd0342d6f0bf17a936bfa3ca511b746816
parents 31b04700 9713651b
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