Commit b57c5561 by tonihei Committed by Toni

Remove deprecated Timeline.getWindow method.

Removing this method requires custom MediaSource implementations to switch
to the new version. While this breaks the implmentation, it also avoids problems
with accidentely forwarding to the wrong method or with accidental stack
overflows when none of the two methods gets implemented.

It's unlikely any callers are affected because this is only the extended version
with the defaultProjectionPositionUs parameter that no caller except the
internal player will use.

PiperOrigin-RevId: 267323042
parent 40870b87
...@@ -657,17 +657,8 @@ public abstract class Timeline { ...@@ -657,17 +657,8 @@ public abstract class Timeline {
* default start position should be projected. * default start position should be projected.
* @return The populated {@link Window}, for convenience. * @return The populated {@link Window}, for convenience.
*/ */
@SuppressWarnings("deprecation") public abstract Window getWindow(
public Window getWindow(int windowIndex, Window window, long defaultPositionProjectionUs) { int windowIndex, Window window, long defaultPositionProjectionUs);
return getWindow(windowIndex, window, /* setTag= */ true, defaultPositionProjectionUs);
}
/** @deprecated Implement {@link #getWindow(int, Window, long)} instead and always set the tag. */
@Deprecated
public Window getWindow(
int windowIndex, Window window, boolean setTag, long defaultPositionProjectionUs) {
return getWindow(windowIndex, window, defaultPositionProjectionUs);
}
/** /**
* Returns the number of periods in the timeline. * Returns the number of periods in the timeline.
......
...@@ -62,12 +62,6 @@ public abstract class ForwardingTimeline extends Timeline { ...@@ -62,12 +62,6 @@ public abstract class ForwardingTimeline extends Timeline {
} }
@Override @Override
public final Window getWindow(
int windowIndex, Window window, boolean setIds, long defaultPositionProjectionUs) {
return getWindow(windowIndex, window, defaultPositionProjectionUs);
}
@Override
public int getPeriodCount() { public int getPeriodCount() {
return timeline.getPeriodCount(); return timeline.getPeriodCount();
} }
......
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