Expand dangal workaround to all API levels

It doesn't seem worth keeping the cap, since the device
will presumably stop receiving major version updates at
some point anyway.

Issue: #6899
PiperOrigin-RevId: 291899439
This commit is contained in:
olly 2020-01-28 11:20:11 +00:00 committed by Oliver Woodman
parent 3e75d2a689
commit 12bb35867e

View file

@ -1615,9 +1615,14 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
} }
synchronized (MediaCodecVideoRenderer.class) { synchronized (MediaCodecVideoRenderer.class) {
if (!evaluatedDeviceNeedsSetOutputSurfaceWorkaround) { if (!evaluatedDeviceNeedsSetOutputSurfaceWorkaround) {
if (Util.SDK_INT <= 27 && ("dangal".equals(Util.DEVICE) || "HWEML".equals(Util.DEVICE))) { if ("dangal".equals(Util.DEVICE)) {
// A small number of devices are affected on API level 27: // Workaround for MiTV devices:
// https://github.com/google/ExoPlayer/issues/5169. // https://github.com/google/ExoPlayer/issues/5169,
// https://github.com/google/ExoPlayer/issues/6899.
deviceNeedsSetOutputSurfaceWorkaround = true;
} else if (Util.SDK_INT <= 27 && "HWEML".equals(Util.DEVICE)) {
// Workaround for Huawei P20:
// https://github.com/google/ExoPlayer/issues/4468#issuecomment-459291645.
deviceNeedsSetOutputSurfaceWorkaround = true; deviceNeedsSetOutputSurfaceWorkaround = true;
} else if (Util.SDK_INT >= 27) { } else if (Util.SDK_INT >= 27) {
// In general, devices running API level 27 or later should be unaffected. Do nothing. // In general, devices running API level 27 or later should be unaffected. Do nothing.