Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
71de1d37
authored
Jul 01, 2019
by
tonihei
Committed by
Oliver Woodman
Jul 02, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Don't consume touch events if no controller is attached.
Issue:#6109 PiperOrigin-RevId: 255933121
parent
6fe70ca4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java
View file @
71de1d37
...
@@ -1050,6 +1050,9 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
...
@@ -1050,6 +1050,9 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
@Override
@Override
public
boolean
onTouchEvent
(
MotionEvent
event
)
{
public
boolean
onTouchEvent
(
MotionEvent
event
)
{
if
(!
useController
||
player
==
null
)
{
return
false
;
}
switch
(
event
.
getAction
())
{
switch
(
event
.
getAction
())
{
case
MotionEvent
.
ACTION_DOWN
:
case
MotionEvent
.
ACTION_DOWN
:
isTouching
=
true
;
isTouching
=
true
;
...
@@ -1150,9 +1153,6 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
...
@@ -1150,9 +1153,6 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
// Internal methods.
// Internal methods.
private
boolean
toggleControllerVisibility
()
{
private
boolean
toggleControllerVisibility
()
{
if
(!
useController
||
player
==
null
)
{
return
false
;
}
if
(!
controller
.
isVisible
())
{
if
(!
controller
.
isVisible
())
{
maybeShowController
(
true
);
maybeShowController
(
true
);
}
else
if
(
controllerHideOnTouch
)
{
}
else
if
(
controllerHideOnTouch
)
{
...
@@ -1471,6 +1471,9 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
...
@@ -1471,6 +1471,9 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
@Override
@Override
public
boolean
onSingleTapUp
(
MotionEvent
e
)
{
public
boolean
onSingleTapUp
(
MotionEvent
e
)
{
if
(!
useController
||
player
==
null
)
{
return
false
;
}
return
toggleControllerVisibility
();
return
toggleControllerVisibility
();
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment