Suppress lint warning about wrong IntDef assignment.

The return values of AudioManager.getPlaybackOffloadSupport are the same as the values defined in C.AudioManagerOffloadMode.

PiperOrigin-RevId: 406817413
This commit is contained in:
tonihei 2021-11-01 14:08:07 +00:00
parent eeaa617160
commit f382ef0ae2

View File

@ -18,6 +18,7 @@ package com.google.android.exoplayer2.audio;
import static java.lang.Math.max;
import static java.lang.Math.min;
import android.annotation.SuppressLint;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioTrack;
@ -1634,6 +1635,8 @@ public final class DefaultAudioSink implements AudioSink {
}
@RequiresApi(29)
// Return values of AudioManager.getPlaybackOffloadSupport are equal to C.AudioManagerOffloadMode.
@SuppressLint("WrongConstant")
@C.AudioManagerOffloadMode
private int getOffloadedPlaybackSupport(
AudioFormat audioFormat, android.media.AudioAttributes audioAttributes) {