mirror of
https://github.com/androidx/media.git
synced 2025-05-09 08:30:43 +08:00
Check if controller is used when performing click directly.
Issue:#6260 PiperOrigin-RevId: 261647858
This commit is contained in:
parent
b0c2b1a0fa
commit
936a7789c9
@ -24,6 +24,9 @@
|
||||
([#6192](https://github.com/google/ExoPlayer/issues/6192)).
|
||||
* Fix Flac and ALAC playback on some LG devices
|
||||
([#5938](https://github.com/google/ExoPlayer/issues/5938)).
|
||||
* Fix issue when calling `performClick` on `PlayerView` without
|
||||
`PlayerControlView`
|
||||
([#6260](https://github.com/google/ExoPlayer/issues/6260)).
|
||||
|
||||
### 2.10.3 ###
|
||||
|
||||
|
@ -1156,6 +1156,9 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
||||
// Internal methods.
|
||||
|
||||
private boolean toggleControllerVisibility() {
|
||||
if (!useController || player == null) {
|
||||
return false;
|
||||
}
|
||||
if (!controller.isVisible()) {
|
||||
maybeShowController(true);
|
||||
} else if (controllerHideOnTouch) {
|
||||
@ -1492,9 +1495,6 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
||||
|
||||
@Override
|
||||
public boolean onSingleTapUp(MotionEvent e) {
|
||||
if (!useController || player == null) {
|
||||
return false;
|
||||
}
|
||||
return toggleControllerVisibility();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user