Small cleanup of Util constants.

- Remove null checks (never happens).
- Use "const".equals(Util.CONST) where possible.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128351654
This commit is contained in:
olly 2016-07-25 06:55:45 -07:00 committed by Oliver Woodman
parent 1624135c20
commit eca3edb940
2 changed files with 5 additions and 5 deletions

View File

@ -1018,8 +1018,8 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
private static boolean codecNeedsAdaptationWorkaround(String name) { private static boolean codecNeedsAdaptationWorkaround(String name) {
return Util.SDK_INT < 24 return Util.SDK_INT < 24
&& ("OMX.Nvidia.h264.decode".equals(name) || "OMX.Nvidia.h264.decode.secure".equals(name)) && ("OMX.Nvidia.h264.decode".equals(name) || "OMX.Nvidia.h264.decode.secure".equals(name))
&& (Util.DEVICE.equals("flounder") || Util.DEVICE.equals("flounder_lte") && ("flounder".equals(Util.DEVICE) || "flounder_lte".equals(Util.DEVICE)
|| Util.DEVICE.equals("grouper") || Util.DEVICE.equals("tilapia")); || "grouper".equals(Util.DEVICE) || "tilapia".equals(Util.DEVICE));
} }
/** /**

View File

@ -258,14 +258,14 @@ public final class MediaCodecUtil {
// Work around https://github.com/google/ExoPlayer/issues/548 // Work around https://github.com/google/ExoPlayer/issues/548
// VP8 decoder on Samsung Galaxy S3/S4/S4 Mini/Tab 3 does not render video. // VP8 decoder on Samsung Galaxy S3/S4/S4 Mini/Tab 3 does not render video.
if (Util.SDK_INT <= 19 && Util.DEVICE != null if (Util.SDK_INT <= 19
&& (Util.DEVICE.startsWith("d2") || Util.DEVICE.startsWith("serrano") && (Util.DEVICE.startsWith("d2") || Util.DEVICE.startsWith("serrano")
|| Util.DEVICE.startsWith("jflte") || Util.DEVICE.startsWith("santos")) || Util.DEVICE.startsWith("jflte") || Util.DEVICE.startsWith("santos"))
&& "samsung".equals(Util.MANUFACTURER) && name.equals("OMX.SEC.vp8.dec")) { && "samsung".equals(Util.MANUFACTURER) && "OMX.SEC.vp8.dec".equals(name)) {
return false; return false;
} }
// VP8 decoder on Samsung Galaxy S4 cannot be queried. // VP8 decoder on Samsung Galaxy S4 cannot be queried.
if (Util.SDK_INT <= 19 && Util.DEVICE != null && Util.DEVICE.startsWith("jflte") if (Util.SDK_INT <= 19 && Util.DEVICE.startsWith("jflte")
&& "OMX.qcom.video.decoder.vp8".equals(name)) { && "OMX.qcom.video.decoder.vp8".equals(name)) {
return false; return false;
} }