| Index: chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java
|
| index ccbbd5af5b08c6aa40d45faddd9454114350e300..15bd2a53b73b472d758a12e27a0caaee23f2b299 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java
|
| @@ -180,7 +180,6 @@ public class BottomSheet extends FrameLayout implements FadingBackgroundView.Fad
|
|
|
| // Cancel the settling animation if it is running so it doesn't conflict with where the
|
| // user wants to move the sheet.
|
| - boolean wasSettleAnimatorRunning = isRunningSettleAnimation();
|
| cancelAnimation();
|
|
|
| mVelocityTracker.addMovement(e2);
|
| @@ -213,12 +212,6 @@ public class BottomSheet extends FrameLayout implements FadingBackgroundView.Fad
|
| return false;
|
| }
|
|
|
| - // Send a notification that the sheet is exiting the peeking state into something that
|
| - // will show content.
|
| - if (!mIsScrolling && mCurrentState == SHEET_STATE_PEEK && !wasSettleAnimatorRunning) {
|
| - onExitPeekState();
|
| - }
|
| -
|
| float newOffset = getSheetOffsetFromBottom() + distanceY;
|
| setSheetOffsetFromBottom(MathUtils.clamp(newOffset, getMinOffset(), getMaxOffset()));
|
|
|
| @@ -553,6 +546,11 @@ public class BottomSheet extends FrameLayout implements FadingBackgroundView.Fad
|
| * @param offset The offset that the sheet should be.
|
| */
|
| private void setSheetOffsetFromBottom(float offset) {
|
| + if (MathUtils.areFloatsEqual(getSheetOffsetFromBottom(), getMinOffset())
|
| + && offset > getMinOffset()) {
|
| + onExitPeekState();
|
| + }
|
| +
|
| setTranslationY(mContainerHeight - offset);
|
| sendUpdatePeekToHalfEvent();
|
| }
|
|
|