Remove unneeded unchecked warning suppressions

Most of these are no longer needed since aa9eb5abc9

Cleanup change automatically generated by error-prone refactoring
//java/com/google/devtools/staticanalysis/errorprone:UnnecessaryJavacSuppressWarnings_refactoring on targets third_party/java_src/android_libs/exoplayer/v2/... java/com/google/android/libraries/exoplayer/v2/...

PiperOrigin-RevId: 302916092
This commit is contained in:
ibaker 2020-03-25 17:15:32 +00:00 committed by Oliver Woodman
parent 92494ce44b
commit 4ff04696c4
7 changed files with 1 additions and 10 deletions

View File

@ -637,7 +637,6 @@ public abstract class DecoderAudioRenderer extends BaseRenderer implements Media
decoderDrmSession = session; decoderDrmSession = session;
} }
@SuppressWarnings("unchecked")
private void onInputFormatChanged(FormatHolder formatHolder) throws ExoPlaybackException { private void onInputFormatChanged(FormatHolder formatHolder) throws ExoPlaybackException {
Format newFormat = Assertions.checkNotNull(formatHolder.format); Format newFormat = Assertions.checkNotNull(formatHolder.format);
setSourceDrmSession(formatHolder.drmSession); setSourceDrmSession(formatHolder.drmSession);

View File

@ -25,7 +25,6 @@ import com.google.android.exoplayer2.util.MediaSourceEventDispatcher;
public interface DrmSessionManager { public interface DrmSessionManager {
/** Returns {@link #DUMMY}. */ /** Returns {@link #DUMMY}. */
@SuppressWarnings("unchecked")
static DrmSessionManager getDummyDrmSessionManager() { static DrmSessionManager getDummyDrmSessionManager() {
return DUMMY; return DUMMY;
} }

View File

@ -104,7 +104,6 @@ public final class OfflineLicenseHelper {
* @return A new instance which uses Widevine CDM. * @return A new instance which uses Widevine CDM.
* @see DefaultDrmSessionManager.Builder * @see DefaultDrmSessionManager.Builder
*/ */
@SuppressWarnings("unchecked")
public static OfflineLicenseHelper newWidevineInstance( public static OfflineLicenseHelper newWidevineInstance(
String defaultLicenseUrl, String defaultLicenseUrl,
boolean forceDefaultLicenseUrl, boolean forceDefaultLicenseUrl,
@ -125,7 +124,6 @@ public final class OfflineLicenseHelper {
* MediaSourceEventDispatcher)} instead. * MediaSourceEventDispatcher)} instead.
*/ */
@Deprecated @Deprecated
@SuppressWarnings("unchecked")
public OfflineLicenseHelper( public OfflineLicenseHelper(
UUID uuid, UUID uuid,
ExoMediaDrm.Provider mediaDrmProvider, ExoMediaDrm.Provider mediaDrmProvider,

View File

@ -1355,7 +1355,6 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
* @param formatHolder A {@link FormatHolder} that holds the new {@link Format}. * @param formatHolder A {@link FormatHolder} that holds the new {@link Format}.
* @throws ExoPlaybackException If an error occurs re-initializing the {@link MediaCodec}. * @throws ExoPlaybackException If an error occurs re-initializing the {@link MediaCodec}.
*/ */
@SuppressWarnings("unchecked")
protected void onInputFormatChanged(FormatHolder formatHolder) throws ExoPlaybackException { protected void onInputFormatChanged(FormatHolder formatHolder) throws ExoPlaybackException {
waitingForFirstSampleInFormat = true; waitingForFirstSampleInFormat = true;
Format newFormat = Assertions.checkNotNull(formatHolder.format); Format newFormat = Assertions.checkNotNull(formatHolder.format);

View File

@ -798,7 +798,7 @@ public final class DownloadHelper {
} }
// Initialization of array of Lists. // Initialization of array of Lists.
@SuppressWarnings({"unchecked", "rawtypes"}) @SuppressWarnings("unchecked")
private void onMediaPrepared() { private void onMediaPrepared() {
Assertions.checkNotNull(mediaPreparer); Assertions.checkNotNull(mediaPreparer);
Assertions.checkNotNull(mediaPreparer.mediaPeriods); Assertions.checkNotNull(mediaPreparer.mediaPeriods);

View File

@ -375,7 +375,6 @@ public abstract class DecoderVideoRenderer extends BaseRenderer {
* @throws ExoPlaybackException If an error occurs (re-)initializing the decoder. * @throws ExoPlaybackException If an error occurs (re-)initializing the decoder.
*/ */
@CallSuper @CallSuper
@SuppressWarnings("unchecked")
protected void onInputFormatChanged(FormatHolder formatHolder) throws ExoPlaybackException { protected void onInputFormatChanged(FormatHolder formatHolder) throws ExoPlaybackException {
waitingForFirstSampleInFormat = true; waitingForFirstSampleInFormat = true;
Format newFormat = Assertions.checkNotNull(formatHolder.format); Format newFormat = Assertions.checkNotNull(formatHolder.format);

View File

@ -131,7 +131,6 @@ public final class SampleQueueTest {
private DecoderInputBuffer inputBuffer; private DecoderInputBuffer inputBuffer;
@Before @Before
@SuppressWarnings("unchecked")
public void setUp() { public void setUp() {
allocator = new DefaultAllocator(false, ALLOCATION_SIZE); allocator = new DefaultAllocator(false, ALLOCATION_SIZE);
mockDrmSessionManager = Mockito.mock(DrmSessionManager.class); mockDrmSessionManager = Mockito.mock(DrmSessionManager.class);
@ -413,7 +412,6 @@ public final class SampleQueueTest {
} }
@Test @Test
@SuppressWarnings("unchecked")
public void allowPlaceholderSessionPopulatesDrmSession() { public void allowPlaceholderSessionPopulatesDrmSession() {
when(mockDrmSession.getState()).thenReturn(DrmSession.STATE_OPENED_WITH_KEYS); when(mockDrmSession.getState()).thenReturn(DrmSession.STATE_OPENED_WITH_KEYS);
DrmSession mockPlaceholderDrmSession = Mockito.mock(DrmSession.class); DrmSession mockPlaceholderDrmSession = Mockito.mock(DrmSession.class);
@ -459,7 +457,6 @@ public final class SampleQueueTest {
} }
@Test @Test
@SuppressWarnings("unchecked")
public void trailingCryptoInfoInitializationVectorBytesZeroed() { public void trailingCryptoInfoInitializationVectorBytesZeroed() {
when(mockDrmSession.getState()).thenReturn(DrmSession.STATE_OPENED_WITH_KEYS); when(mockDrmSession.getState()).thenReturn(DrmSession.STATE_OPENED_WITH_KEYS);
DrmSession mockPlaceholderDrmSession = Mockito.mock(DrmSession.class); DrmSession mockPlaceholderDrmSession = Mockito.mock(DrmSession.class);