Fix bug that clicking didn't show up controls at the beginning

StyledLayoutManager#isFullyVisibility() was wrong and
so hiding/showing logic didn't work properly.

PiperOrigin-RevId: 324996446
This commit is contained in:
insun 2020-08-05 12:57:32 +01:00 committed by kim-vde
parent 5342576e73
commit b26d578ff3

View file

@ -53,7 +53,7 @@ import java.util.ArrayList;
private final Runnable hideControllerRunnable; private final Runnable hideControllerRunnable;
private final OnLayoutChangeListener onLayoutChangeListener; private final OnLayoutChangeListener onLayoutChangeListener;
private int uxState = UX_STATE_ALL_VISIBLE; private int uxState;
private boolean initiallyHidden; private boolean initiallyHidden;
private boolean isMinimalMode; private boolean isMinimalMode;
private boolean needToShowBars; private boolean needToShowBars;
@ -88,6 +88,7 @@ import java.util.ArrayList;
hideControllerRunnable = this::hideController; hideControllerRunnable = this::hideController;
onLayoutChangeListener = this::onLayoutChange; onLayoutChangeListener = this::onLayoutChange;
animationEnabled = true; animationEnabled = true;
uxState = UX_STATE_ALL_VISIBLE;
} }
public void show() { public void show() {
@ -432,7 +433,7 @@ import java.util.ArrayList;
if (styledPlayerControlView == null) { if (styledPlayerControlView == null) {
return false; return false;
} }
return uxState == UX_STATE_ALL_VISIBLE; return uxState == UX_STATE_ALL_VISIBLE && styledPlayerControlView.isVisible();
} }
private void setUxState(int uxState) { private void setUxState(int uxState) {