Skip to content

Commit

Permalink
Don't break navigation if player Views other than controls are focused
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-- committed Apr 11, 2020
1 parent ef7a5bc commit 54ceb85
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ public boolean onKeyDown(final int keyCode, final KeyEvent event) {
case KeyEvent.KEYCODE_DPAD_DOWN:
case KeyEvent.KEYCODE_DPAD_RIGHT:
case KeyEvent.KEYCODE_DPAD_CENTER:
View playerRoot = playerImpl.getRootView();
View controls = playerImpl.getControlsRoot();
if (playerRoot.hasFocus() && !controls.hasFocus()) {
// do not interfere with focus in playlist etc.
return super.onKeyDown(keyCode, event);
}

if (playerImpl.getCurrentState() == BasePlayer.STATE_BLOCKED) {
return true;
}
Expand Down

0 comments on commit 54ceb85

Please sign in to comment.