Commit 859e160a authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Commit Bot

Android: Fix gesture navigation not working

Gesture navigation |getTargetOrCurrentState| regarded the state of
BottomSheet as NONE if it is not available yet. Previously the widget
was eagerly created the returned state was HIDDEN. Now BottomSheet
widget is lazily initialized, the method started returning NONE,
and it caused a bug not triggering the sheet at all. This CL fixes it
by defining the state of non-existing BottomSheet as HIDDEN.

Bug: 1020938
Change-Id: I460efcdceed29b5ae70249b7f6ace644afceeba4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1900506Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarJinsuk Kim <jinsukkim@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712849}
parent 0454521f
......@@ -264,7 +264,7 @@ class NavigationSheetCoordinator implements BottomSheetContent, NavigationSheet
private @SheetState int getTargetOrCurrentState() {
BottomSheet sheet = mBottomSheetController.get().getBottomSheet();
if (sheet == null) return BottomSheetController.SheetState.NONE;
if (sheet == null) return BottomSheetController.SheetState.HIDDEN;
@SheetState
int state = mBottomSheetController.get().getTargetSheetState();
return state != BottomSheetController.SheetState.NONE
......
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