From a2a2acfd6a5ded91bcd37aa15ad0be7ed1fa6d83 Mon Sep 17 00:00:00 2001 From: olly Date: Tue, 15 Aug 2017 04:06:29 -0700 Subject: [PATCH] Disable secure dummy surface on all Samsung N devices ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=165291627 --- .../google/android/exoplayer2/video/DummySurface.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/video/DummySurface.java b/library/core/src/main/java/com/google/android/exoplayer2/video/DummySurface.java index 7a80294929..a45616c6ed 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/video/DummySurface.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/video/DummySurface.java @@ -42,7 +42,6 @@ import static android.opengl.GLES20.glGenTextures; import android.annotation.TargetApi; import android.content.Context; -import android.content.pm.PackageManager; import android.graphics.SurfaceTexture; import android.graphics.SurfaceTexture.OnFrameAvailableListener; import android.opengl.EGL14; @@ -152,15 +151,9 @@ public final class DummySurface extends Surface { * * @param context Any {@link Context}. */ + @SuppressWarnings("unused") // Context may be needed in the future for better targeting. private static boolean deviceNeedsSecureDummySurfaceWorkaround(Context context) { - return Util.SDK_INT == 24 - && "samsung".equals(Util.MANUFACTURER) - && !hasVrModeHighPerformanceSystemFeatureV24(context.getPackageManager()); - } - - @TargetApi(24) - private static boolean hasVrModeHighPerformanceSystemFeatureV24(PackageManager packageManager) { - return packageManager.hasSystemFeature(PackageManager.FEATURE_VR_MODE_HIGH_PERFORMANCE); + return Util.SDK_INT == 24 && "samsung".equals(Util.MANUFACTURER); } private static class DummySurfaceThread extends HandlerThread implements OnFrameAvailableListener,