Commit fd10a3cb by olly Committed by Oliver Woodman

Fix initial visibility of PlayerControlView

This applies when PlayerControlView is used as a standalone
component (not inside PlayerView). Previously hideAtMs was
set to 0, which caused the view to be immediatley hidden in
onAttachedToWindow. After this change the first time the view
is attached to the window is effectively treated as a "user
interaction" for the purposes of deciding when to timeout.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184056324
parent 2f932bfa
......@@ -271,6 +271,7 @@ public class PlayerControlView extends FrameLayout {
fastForwardMs = DEFAULT_FAST_FORWARD_MS;
showTimeoutMs = DEFAULT_SHOW_TIMEOUT_MS;
repeatToggleModes = DEFAULT_REPEAT_TOGGLE_MODES;
hideAtMs = C.TIME_UNSET;
showShuffleButton = false;
if (playbackAttrs != null) {
TypedArray a =
......@@ -937,6 +938,8 @@ public class PlayerControlView extends FrameLayout {
} else {
postDelayed(hideAction, delayMs);
}
} else if (isVisible()) {
hideAfterTimeout();
}
updateAll();
}
......
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 sign in to comment