Android: Get back scrim on navigation popup
This CL restores the missing scrim when there is a single entry on the navigation sheet. The repro step is unique in that it's the only situation where the sheet with a single entry "Show full history" is displayed. All the others show at least 2. The scrim didn't appear since BottomSheet didn't trigger the event |onSheetOpened|. The minimum swipable state is set to peek(https://crrev.com/c/1880495), but the sheet height with a single entry is smaller than that of the peek state (1.5 x entry height), therefore didn't meet the condition that fires the event. To address the issue, following changes were made: 1) BottomSheetContent disables peek/half state for this occasion so that the sheet can go straight to full state. 2) Skip calling |expandSheet| but used BottomSheetContent state info to have the same effect. The explicit call to the API, when combined with the above change, causes the same state transition (full -> full), which cancels the animation effect. Bug: 1020408 Change-Id: I2b9d3d2f495a167dd844be82b9796bfeeb2fda81 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1893129Reviewed-by:Matthew Jones <mdjones@chromium.org> Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org> Cr-Commit-Position: refs/heads/master@{#711919}
Showing
Please register or sign in to comment