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
0c7f1160
authored
Aug 31, 2017
by
Danny Brain
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
#3215 Additional secure DummySurface device exclusions
parent
6bf0b7f3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
library/core/src/main/java/com/google/android/exoplayer2/video/DummySurface.java
library/core/src/main/java/com/google/android/exoplayer2/video/DummySurface.java
View file @
0c7f1160
...
@@ -43,6 +43,7 @@ import static android.opengl.GLES20.glGenTextures;
...
@@ -43,6 +43,7 @@ import static android.opengl.GLES20.glGenTextures;
import
android.annotation.TargetApi
;
import
android.annotation.TargetApi
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.pm.PackageManager
;
import
android.graphics.SurfaceTexture
;
import
android.graphics.SurfaceTexture
;
import
android.graphics.SurfaceTexture.OnFrameAvailableListener
;
import
android.graphics.SurfaceTexture.OnFrameAvailableListener
;
import
android.opengl.EGL14
;
import
android.opengl.EGL14
;
...
@@ -152,9 +153,16 @@ public final class DummySurface extends Surface {
...
@@ -152,9 +153,16 @@ public final class DummySurface extends Surface {
*
*
* @param context Any {@link Context}.
* @param context Any {@link Context}.
*/
*/
@SuppressWarnings
(
"unused"
)
// Context may be needed in the future for better targeting.
@SuppressWarnings
(
"unused"
)
private
static
boolean
deviceNeedsSecureDummySurfaceWorkaround
(
Context
context
)
{
private
static
boolean
deviceNeedsSecureDummySurfaceWorkaround
(
Context
context
)
{
return
Util
.
SDK_INT
==
24
&&
"samsung"
.
equals
(
Util
.
MANUFACTURER
);
return
(
Util
.
SDK_INT
==
24
&&
"samsung"
.
equals
(
Util
.
MANUFACTURER
))
||
(
Util
.
SDK_INT
>=
24
&&
Util
.
SDK_INT
<
26
&&
!
hasVrModeHighPerformanceSystemFeatureV24
(
context
.
getPackageManager
()));
}
@TargetApi
(
24
)
private
static
boolean
hasVrModeHighPerformanceSystemFeatureV24
(
PackageManager
packageManager
)
{
return
packageManager
.
hasSystemFeature
(
PackageManager
.
FEATURE_VR_MODE_HIGH_PERFORMANCE
);
}
}
private
static
class
DummySurfaceThread
extends
HandlerThread
implements
OnFrameAvailableListener
,
private
static
class
DummySurfaceThread
extends
HandlerThread
implements
OnFrameAvailableListener
,
...
...
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