Commit eefda2b1 authored by Matt Jones's avatar Matt Jones Committed by Commit Bot

No longer consider find-in-page in BottomSheet

The BottomSheet previously attempted to check the state of find-in-page
by looking up its view. Not only does this not work correctly, but
there does not appear to be any poor interaction between the widget and
find-in-page. This code has been removed.

Bug: 1002277
Change-Id: Idd9f39605365c177c72a98d82a84407bb801c8d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2040172Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738728}
parent 030d9a61
......@@ -122,9 +122,6 @@ class BottomSheet extends FrameLayout
@Nullable
protected BottomSheetContent mSheetContent;
/** A handle to the find-in-page toolbar. */
private View mFindInPageView;
/** A handle to the FrameLayout that holds the content of the bottom sheet. */
private TouchRestrictingFrameLayout mBottomSheetContentContainer;
......@@ -227,7 +224,7 @@ class BottomSheet extends FrameLayout
// anything with them.
if (!mIsTouchEnabled) return true;
if (!canMoveSheet()) return false;
if (isHiding()) return false;
return mGestureDetector.onInterceptTouchEvent(e);
}
......@@ -1135,19 +1132,6 @@ class BottomSheet extends FrameLayout
return mToolbarShadowHeight;
}
/**
* Checks whether the sheet can be moved. It cannot be moved when the activity is in overview
* mode, when "find in page" is visible, when the toolbar is in the animation to hide, or when
* the toolbar is hidden.
*/
protected boolean canMoveSheet() {
if (mFindInPageView == null) mFindInPageView = findViewById(R.id.find_toolbar);
boolean isFindInPageVisible =
mFindInPageView != null && mFindInPageView.getVisibility() == View.VISIBLE;
return !isFindInPageVisible && mTargetState != SheetState.HIDDEN;
}
/**
* Called when the sheet content has changed, to update dependent state and notify observers.
* @param content The new sheet content, or null if the sheet has no content.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment