mirror of
https://github.com/androidx/media.git
synced 2025-05-10 00:59:51 +08:00
Fix onTimelineChanged call (timeline should never be null).
Issue: #2186 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=141790023
This commit is contained in:
parent
ac9813729f
commit
2a79931ec5
@ -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;
|
|||||||
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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user