From 4f8b09830717b8a29aa2bab7e75833d5880f78c5 Mon Sep 17 00:00:00 2001 From: olly Date: Wed, 19 Dec 2018 19:30:09 +0000 Subject: [PATCH] Blacklist OMX.SEC.mp3.dec for more devices Issue #4519 PiperOrigin-RevId: 226205245 --- .../exoplayer2/mediacodec/MediaCodecUtil.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java b/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java index f6cc6a83444..4d971d461e1 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java @@ -319,19 +319,20 @@ private static boolean isCodecUsableDecoder(android.media.MediaCodecInfo info, S // Work around https://github.com/google/ExoPlayer/issues/4519. if ("OMX.SEC.mp3.dec".equals(name) - && ("GT-I9152".equals(Util.MODEL) - || "GT-I9515".equals(Util.MODEL) - || "GT-P5220".equals(Util.MODEL) - || "GT-S7580".equals(Util.MODEL) - || "SM-G350".equals(Util.MODEL) - || "SM-T231".equals(Util.MODEL) - || "SM-T530".equals(Util.MODEL))) { + && (Util.MODEL.startsWith("GT-I9152") + || Util.MODEL.startsWith("GT-I9515") + || Util.MODEL.startsWith("GT-P5220") + || Util.MODEL.startsWith("GT-S7580") + || Util.MODEL.startsWith("SM-G350") + || Util.MODEL.startsWith("SM-G386") + || Util.MODEL.startsWith("SM-T231") + || Util.MODEL.startsWith("SM-T530"))) { return false; } if ("OMX.brcm.audio.mp3.decoder".equals(name) - && ("GT-I9152".equals(Util.MODEL) - || "GT-S7580".equals(Util.MODEL) - || "SM-G350".equals(Util.MODEL))) { + && (Util.MODEL.startsWith("GT-I9152") + || Util.MODEL.startsWith("GT-S7580") + || Util.MODEL.startsWith("SM-G350"))) { return false; }