mirror of
https://github.com/samsonjs/media.git
synced 2026-04-11 12:15:47 +00:00
Don't show player controls unless key press is handled
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=200991862
This commit is contained in:
parent
9eedb8e855
commit
0e4cb52979
1 changed files with 6 additions and 2 deletions
|
|
@ -681,8 +681,12 @@ public class PlayerView extends FrameLayout {
|
|||
}
|
||||
boolean isDpadWhenControlHidden =
|
||||
isDpadKey(event.getKeyCode()) && useController && !controller.isVisible();
|
||||
maybeShowController(true);
|
||||
return isDpadWhenControlHidden || dispatchMediaKeyEvent(event) || super.dispatchKeyEvent(event);
|
||||
boolean handled =
|
||||
isDpadWhenControlHidden || dispatchMediaKeyEvent(event) || super.dispatchKeyEvent(event);
|
||||
if (handled) {
|
||||
maybeShowController(true);
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue