Avoid OMX.qti.audio.decoder.flac on API level < 32

Before, this decoder was avoided on API levels < 30.

#minor-release
Issue:#9349
PiperOrigin-RevId: 395209684
This commit is contained in:
kimvde 2021-09-07 11:17:47 +01:00 committed by kim-vde
parent d05c15dee0
commit 7129d84efd

View File

@ -580,10 +580,10 @@ public final class MediaCodecUtil {
}
}
if (Util.SDK_INT < 30 && decoderInfos.size() > 1) {
if (Util.SDK_INT < 32 && decoderInfos.size() > 1) {
String firstCodecName = decoderInfos.get(0).name;
// Prefer anything other than OMX.qti.audio.decoder.flac on older devices. See [Internal
// ref: b/147278539] and [Internal ref: b/147354613].
// ref: b/199124812].
if ("OMX.qti.audio.decoder.flac".equals(firstCodecName)) {
decoderInfos.add(decoderInfos.remove(0));
}