Rework if condition to avoid NewApi lint error

Some infra thinks the if does not protect against API incompatibilities
(example: Android's soong build system). AndroidStudio 2021.3.1 also
signals a warning.

#minor-release

PiperOrigin-RevId: 435027073
This commit is contained in:
aquilescanta 2022-03-16 13:01:35 +00:00 committed by Ian Baker
parent 1b3838cb0e
commit 1a6e176873

View File

@ -96,8 +96,9 @@ public final class DefaultMediaCodecAdapterFactory implements MediaCodecAdapter.
@Override
public MediaCodecAdapter createAdapter(MediaCodecAdapter.Configuration configuration)
throws IOException {
if ((asynchronousMode == MODE_ENABLED && Util.SDK_INT >= 23)
|| (asynchronousMode == MODE_DEFAULT && Util.SDK_INT >= 31)) {
if (Util.SDK_INT >= 23
&& (asynchronousMode == MODE_ENABLED
|| (asynchronousMode == MODE_DEFAULT && Util.SDK_INT >= 31))) {
int trackType = MimeTypes.getTrackType(configuration.format.sampleMimeType);
Log.i(
TAG,