mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Add some missing Nullable annotations
Also remove NonNull, since we assume NonNull by default. Except where explicitly overriding a method with NonNull annotated args, in which case we're still expected to use it. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=209758204
This commit is contained in:
parent
e2ebb78b63
commit
9ccbb5bd6d
7 changed files with 8 additions and 9 deletions
|
|
@ -490,7 +490,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
||||||
return codec;
|
return codec;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final MediaCodecInfo getCodecInfo() {
|
protected final @Nullable MediaCodecInfo getCodecInfo() {
|
||||||
return codecInfo;
|
return codecInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import android.content.Context;
|
||||||
import android.graphics.Point;
|
import android.graphics.Point;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
|
|
@ -2032,7 +2033,7 @@ public class DefaultTrackSelector extends MappingTrackSelector {
|
||||||
* negative integer if this score is worse than the other.
|
* negative integer if this score is worse than the other.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(AudioTrackScore other) {
|
public int compareTo(@NonNull AudioTrackScore other) {
|
||||||
if (this.withinRendererCapabilitiesScore != other.withinRendererCapabilitiesScore) {
|
if (this.withinRendererCapabilitiesScore != other.withinRendererCapabilitiesScore) {
|
||||||
return compareInts(this.withinRendererCapabilitiesScore,
|
return compareInts(this.withinRendererCapabilitiesScore,
|
||||||
other.withinRendererCapabilitiesScore);
|
other.withinRendererCapabilitiesScore);
|
||||||
|
|
|
||||||
|
|
@ -379,7 +379,7 @@ public class DefaultHttpDataSource extends BaseDataSource implements HttpDataSou
|
||||||
*
|
*
|
||||||
* @return The current open connection, or null.
|
* @return The current open connection, or null.
|
||||||
*/
|
*/
|
||||||
protected final HttpURLConnection getConnection() {
|
protected final @Nullable HttpURLConnection getConnection() {
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.upstream.cache;
|
package com.google.android.exoplayer2.upstream.cache;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
@ -96,7 +95,6 @@ public interface Cache {
|
||||||
* @param listener The listener to add.
|
* @param listener The listener to add.
|
||||||
* @return The current spans for the key.
|
* @return The current spans for the key.
|
||||||
*/
|
*/
|
||||||
@NonNull
|
|
||||||
NavigableSet<CacheSpan> addListener(String key, Listener listener);
|
NavigableSet<CacheSpan> addListener(String key, Listener listener);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -113,7 +111,6 @@ public interface Cache {
|
||||||
* @param key The key for which spans should be returned.
|
* @param key The key for which spans should be returned.
|
||||||
* @return The spans for the key.
|
* @return The spans for the key.
|
||||||
*/
|
*/
|
||||||
@NonNull
|
|
||||||
NavigableSet<CacheSpan> getCachedSpans(String key);
|
NavigableSet<CacheSpan> getCachedSpans(String key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ package com.google.android.exoplayer2.upstream.cache;
|
||||||
|
|
||||||
import android.os.ConditionVariable;
|
import android.os.ConditionVariable;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import com.google.android.exoplayer2.C;
|
import com.google.android.exoplayer2.C;
|
||||||
import com.google.android.exoplayer2.util.Assertions;
|
import com.google.android.exoplayer2.util.Assertions;
|
||||||
|
|
@ -224,7 +225,7 @@ public final class SimpleCache implements Cache {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized SimpleCacheSpan startReadWriteNonBlocking(String key, long position)
|
public synchronized @Nullable SimpleCacheSpan startReadWriteNonBlocking(String key, long position)
|
||||||
throws CacheException {
|
throws CacheException {
|
||||||
Assertions.checkState(!released);
|
Assertions.checkState(!released);
|
||||||
SimpleCacheSpan cacheSpan = getSpan(key, position);
|
SimpleCacheSpan cacheSpan = getSpan(key, position);
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ public final class DefaultHlsPlaylistTracker
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HlsMasterPlaylist getMasterPlaylist() {
|
public @Nullable HlsMasterPlaylist getMasterPlaylist() {
|
||||||
return masterPlaylist;
|
return masterPlaylist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -597,7 +597,7 @@ public class PlayerView extends FrameLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the default artwork to display. */
|
/** Returns the default artwork to display. */
|
||||||
public Drawable getDefaultArtwork() {
|
public @Nullable Drawable getDefaultArtwork() {
|
||||||
return defaultArtwork;
|
return defaultArtwork;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue