Rename getVideoSurfaceSize to getSurfaceSize

This better matches the callback name (onSurfaceSizeChanged) and
probably cause less confusion with getVideoSize.

PiperOrigin-RevId: 488669786
This commit is contained in:
tonihei 2022-11-15 16:51:12 +00:00 committed by microkatz
parent 1b24e6fd14
commit 8438daca1f
7 changed files with 10 additions and 10 deletions

View file

@ -728,7 +728,7 @@ public final class CastPlayer extends BasePlayer {
/** This method is not supported and returns {@link Size#UNKNOWN}. */
@Override
public Size getVideoSurfaceSize() {
public Size getSurfaceSize() {
return Size.UNKNOWN;
}

View file

@ -762,10 +762,10 @@ public class ForwardingPlayer implements Player {
return player.getVideoSize();
}
/** Calls {@link Player#getVideoSurfaceSize()} on the delegate and returns the result. */
/** Calls {@link Player#getSurfaceSize()} on the delegate and returns the result. */
@Override
public Size getVideoSurfaceSize() {
return player.getVideoSurfaceSize();
public Size getSurfaceSize() {
return player.getSurfaceSize();
}
/** Calls {@link Player#clearVideoSurface()} on the delegate. */

View file

@ -2491,7 +2491,7 @@ public interface Player {
*
* @see Listener#onSurfaceSizeChanged(int, int)
*/
Size getVideoSurfaceSize();
Size getSurfaceSize();
/** Returns the current {@link CueGroup}. */
CueGroup getCurrentCues();

View file

@ -592,7 +592,7 @@ public abstract class SimpleBasePlayer extends BasePlayer {
}
@Override
public final Size getVideoSurfaceSize() {
public final Size getSurfaceSize() {
// TODO: implement.
throw new IllegalStateException();
}

View file

@ -1220,7 +1220,7 @@ import java.util.concurrent.TimeoutException;
}
@Override
public Size getVideoSurfaceSize() {
public Size getSurfaceSize() {
verifyApplicationThread();
return surfaceSize;
}

View file

@ -519,9 +519,9 @@ public class SimpleExoPlayer extends BasePlayer
}
@Override
public Size getVideoSurfaceSize() {
public Size getSurfaceSize() {
blockUntilConstructorFinished();
return player.getVideoSurfaceSize();
return player.getSurfaceSize();
}
@Override

View file

@ -351,7 +351,7 @@ public class StubPlayer extends BasePlayer {
}
@Override
public Size getVideoSurfaceSize() {
public Size getSurfaceSize() {
throw new UnsupportedOperationException();
}