Commit 2a79931e by olly Committed by Oliver Woodman

Fix onTimelineChanged call (timeline should never be null).

Issue: #2186

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141790023
parent ac981372
...@@ -120,8 +120,8 @@ public interface ExoPlayer { ...@@ -120,8 +120,8 @@ public interface ExoPlayer {
* removed from the timeline. The will <em>not</em> be reported via a separate call to * removed from the timeline. The will <em>not</em> be reported via a separate call to
* {@link #onPositionDiscontinuity()}. * {@link #onPositionDiscontinuity()}.
* *
* @param timeline The latest timeline, or null if the timeline is being cleared. * @param timeline The latest timeline. Never null, but may be empty.
* @param manifest The latest manifest, or null if the manifest is being cleared. * @param manifest The latest manifest. May be null.
*/ */
void onTimelineChanged(Timeline timeline, Object manifest); void onTimelineChanged(Timeline timeline, Object manifest);
......
...@@ -125,7 +125,7 @@ import java.util.concurrent.CopyOnWriteArraySet; ...@@ -125,7 +125,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
timeline = Timeline.EMPTY; timeline = Timeline.EMPTY;
manifest = null; manifest = null;
for (EventListener listener : listeners) { for (EventListener listener : listeners) {
listener.onTimelineChanged(null, null); listener.onTimelineChanged(timeline, manifest);
} }
} }
if (tracksSelected) { if (tracksSelected) {
......
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