mirror of
https://github.com/samsonjs/media.git
synced 2026-06-29 05:39:31 +00:00
Add @Nullable annotation for an optional field in CacheDataSource's constructor.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=150278031
This commit is contained in:
parent
8cad99ba98
commit
cadce0ef3f
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue