Commit eed067bc authored by Theresa Wellington's avatar Theresa Wellington Committed by Commit Bot

[Home] Disallow half-height on small screens

If BottomSheet#setSheetState() is called with SHEET_STATE_HALF on a
small screen, change the target state to SHEET_STATE_FULL since half
state is not valid.

BUG=726012

Change-Id: Ie14738718954e4ac77273708ae5c2f3a610a2603
Reviewed-on: https://chromium-review.googlesource.com/531345
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478671}
parent c6cec2f1
......@@ -1124,6 +1124,10 @@ public class BottomSheet
*/
public void setSheetState(@SheetState int state, boolean animate) {
assert state != SHEET_STATE_SCROLLING && state != SHEET_STATE_NONE;
// Half state is not valid on small screens.
if (state == SHEET_STATE_HALF && isSmallScreen()) state = SHEET_STATE_FULL;
mTargetState = state;
cancelAnimation();
......
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