mirror of
https://github.com/androidx/media.git
synced 2025-05-15 03:29:53 +08:00
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:
parent
1624135c20
commit
eca3edb940
@ -1018,8 +1018,8 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
||||
private static boolean codecNeedsAdaptationWorkaround(String name) {
|
||||
return Util.SDK_INT < 24
|
||||
&& ("OMX.Nvidia.h264.decode".equals(name) || "OMX.Nvidia.h264.decode.secure".equals(name))
|
||||
&& (Util.DEVICE.equals("flounder") || Util.DEVICE.equals("flounder_lte")
|
||||
|| Util.DEVICE.equals("grouper") || Util.DEVICE.equals("tilapia"));
|
||||
&& ("flounder".equals(Util.DEVICE) || "flounder_lte".equals(Util.DEVICE)
|
||||
|| "grouper".equals(Util.DEVICE) || "tilapia".equals(Util.DEVICE));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -258,14 +258,14 @@ public final class MediaCodecUtil {
|
||||
|
||||
// Work around https://github.com/google/ExoPlayer/issues/548
|
||||
// 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("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;
|
||||
}
|
||||
// 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)) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user