mirror of
https://github.com/androidx/media.git
synced 2025-05-07 15:40:37 +08:00
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:
parent
1b3838cb0e
commit
1a6e176873
@ -96,8 +96,9 @@ public final class DefaultMediaCodecAdapterFactory implements MediaCodecAdapter.
|
|||||||
@Override
|
@Override
|
||||||
public MediaCodecAdapter createAdapter(MediaCodecAdapter.Configuration configuration)
|
public MediaCodecAdapter createAdapter(MediaCodecAdapter.Configuration configuration)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
if ((asynchronousMode == MODE_ENABLED && Util.SDK_INT >= 23)
|
if (Util.SDK_INT >= 23
|
||||||
|| (asynchronousMode == MODE_DEFAULT && Util.SDK_INT >= 31)) {
|
&& (asynchronousMode == MODE_ENABLED
|
||||||
|
|| (asynchronousMode == MODE_DEFAULT && Util.SDK_INT >= 31))) {
|
||||||
int trackType = MimeTypes.getTrackType(configuration.format.sampleMimeType);
|
int trackType = MimeTypes.getTrackType(configuration.format.sampleMimeType);
|
||||||
Log.i(
|
Log.i(
|
||||||
TAG,
|
TAG,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user