Commit cadce0ef by adrianv Committed by Oliver Woodman

Add @Nullable annotation for an optional field in CacheDataSource's constructor.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150278031
parent 8cad99ba
......@@ -17,6 +17,7 @@ package com.google.android.exoplayer2.upstream.cache;
import android.net.Uri;
import android.support.annotation.IntDef;
import android.support.annotation.Nullable;
import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.upstream.DataSink;
import com.google.android.exoplayer2.upstream.DataSource;
......@@ -89,7 +90,7 @@ public final class CacheDataSource implements DataSource {
private final DataSource cacheReadDataSource;
private final DataSource cacheWriteDataSource;
private final DataSource upstreamDataSource;
private final EventListener eventListener;
@Nullable private final EventListener eventListener;
private final boolean blockOnCache;
private final boolean ignoreCacheOnError;
......@@ -149,7 +150,7 @@ public final class CacheDataSource implements DataSource {
* @param eventListener An optional {@link EventListener} to receive events.
*/
public CacheDataSource(Cache cache, DataSource upstream, DataSource cacheReadDataSource,
DataSink cacheWriteDataSink, @Flags int flags, EventListener eventListener) {
DataSink cacheWriteDataSink, @Flags int flags, @Nullable EventListener eventListener) {
this.cache = cache;
this.cacheReadDataSource = cacheReadDataSource;
this.blockOnCache = (flags & FLAG_BLOCK_ON_CACHE) != 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment