Remove deprecated Player.hasNext() and Player.hasNextWindow()

Use `Player.hasNextMediaItem()` instead.
This commit is contained in:
Gaëtan Muller 2025-02-07 14:24:47 +01:00 committed by tonihei
parent 72c85aa483
commit 521871b9d5
6 changed files with 0 additions and 110 deletions

View File

@ -186,24 +186,6 @@ public abstract class BasePlayer implements Player {
}
}
/**
* @deprecated Use {@link #hasNextMediaItem()} instead.
*/
@Deprecated
@Override
public final boolean hasNext() {
return hasNextMediaItem();
}
/**
* @deprecated Use {@link #hasNextMediaItem()} instead.
*/
@Deprecated
@Override
public final boolean hasNextWindow() {
return hasNextMediaItem();
}
@Override
public final boolean hasNextMediaItem() {
return getNextMediaItemIndex() != C.INDEX_UNSET;

View File

@ -382,30 +382,6 @@ public class ForwardingPlayer implements Player {
return player.getMaxSeekToPreviousPosition();
}
/**
* Calls {@link Player#hasNext()} on the delegate and returns the result.
*
* @deprecated Use {@link #hasNextMediaItem()} instead.
*/
@SuppressWarnings("deprecation") // Forwarding to deprecated method
@Deprecated
@Override
public boolean hasNext() {
return player.hasNext();
}
/**
* Calls {@link Player#hasNextWindow()} on the delegate and returns the result.
*
* @deprecated Use {@link #hasNextMediaItem()} instead.
*/
@SuppressWarnings("deprecation") // Forwarding to deprecated method
@Deprecated
@Override
public boolean hasNextWindow() {
return player.hasNextWindow();
}
/** Calls {@link Player#hasNextMediaItem()} on the delegate and returns the result. */
@Override
public boolean hasNextMediaItem() {

View File

@ -2703,20 +2703,6 @@ public interface Player {
*/
void seekToPrevious();
/**
* @deprecated Use {@link #hasNextMediaItem()} instead.
*/
@UnstableApi
@Deprecated
boolean hasNext();
/**
* @deprecated Use {@link #hasNextMediaItem()} instead.
*/
@UnstableApi
@Deprecated
boolean hasNextWindow();
/**
* Returns whether a next {@link MediaItem} exists, which may depend on the current repeat mode
* and whether shuffle mode is enabled.

View File

@ -1537,26 +1537,6 @@ public class MediaController implements Player {
return isConnected() ? impl.getNextMediaItemIndex() : C.INDEX_UNSET;
}
/**
* @deprecated Use {@link #hasNextMediaItem()} instead.
*/
@UnstableApi
@Deprecated
@Override
public final boolean hasNext() {
return hasNextMediaItem();
}
/**
* @deprecated Use {@link #hasNextMediaItem()} instead.
*/
@UnstableApi
@Deprecated
@Override
public final boolean hasNextWindow() {
return hasNextMediaItem();
}
@Override
public final boolean hasPreviousMediaItem() {
verifyApplicationThread();

View File

@ -618,22 +618,6 @@ import java.util.List;
super.replaceMediaItems(fromIndex, toIndex, mediaItems);
}
@SuppressWarnings("deprecation") // Forwarding deprecated call
@Deprecated
@Override
public boolean hasNext() {
verifyApplicationThread();
return super.hasNext();
}
@SuppressWarnings("deprecation") // Forwarding deprecated call
@Deprecated
@Override
public boolean hasNextWindow() {
verifyApplicationThread();
return super.hasNextWindow();
}
@Override
public boolean hasPreviousMediaItem() {
verifyApplicationThread();

View File

@ -1080,24 +1080,6 @@ public class MockPlayer implements Player {
checkNotNull(conditionVariables.get(METHOD_REPLACE_MEDIA_ITEMS)).open();
}
/**
* @deprecated Use {@link #hasNextMediaItem()} instead.
*/
@Deprecated
@Override
public boolean hasNext() {
throw new UnsupportedOperationException();
}
/**
* @deprecated Use {@link #hasNextMediaItem()} instead.
*/
@Deprecated
@Override
public boolean hasNextWindow() {
throw new UnsupportedOperationException();
}
@Override
public boolean hasPreviousMediaItem() {
throw new UnsupportedOperationException();