mirror of
https://github.com/samsonjs/media.git
synced 2026-04-07 11:35:46 +00:00
ExoPlaybackException: Align some method naming
PiperOrigin-RevId: 327003695
This commit is contained in:
parent
7ef31e2208
commit
513b301e77
3 changed files with 6 additions and 6 deletions
|
|
@ -204,7 +204,7 @@ public final class ExoPlaybackException extends Exception {
|
|||
* @param cause The cause of the failure.
|
||||
* @return The created instance.
|
||||
*/
|
||||
public static ExoPlaybackException createForOutOfMemoryError(OutOfMemoryError cause) {
|
||||
public static ExoPlaybackException createForOutOfMemory(OutOfMemoryError cause) {
|
||||
return new ExoPlaybackException(TYPE_OUT_OF_MEMORY, cause);
|
||||
}
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ public final class ExoPlaybackException extends Exception {
|
|||
* @param timeoutOperation The operation that caused this timeout.
|
||||
* @return The created instance.
|
||||
*/
|
||||
public static ExoPlaybackException createForTimeoutError(
|
||||
public static ExoPlaybackException createForTimeout(
|
||||
TimeoutException cause, @TimeoutOperation int timeoutOperation) {
|
||||
return new ExoPlaybackException(
|
||||
TYPE_OUT_OF_MEMORY,
|
||||
|
|
@ -348,7 +348,7 @@ public final class ExoPlaybackException extends Exception {
|
|||
*
|
||||
* @throws IllegalStateException If {@link #type} is not {@link #TYPE_TIMEOUT}.
|
||||
*/
|
||||
public TimeoutException getTimeoutError() {
|
||||
public TimeoutException getTimeoutException() {
|
||||
Assertions.checkState(type == TYPE_TIMEOUT);
|
||||
return (TimeoutException) Assertions.checkNotNull(cause);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -683,7 +683,7 @@ import java.util.concurrent.TimeoutException;
|
|||
notifyListeners(
|
||||
listener ->
|
||||
listener.onPlayerError(
|
||||
ExoPlaybackException.createForTimeoutError(
|
||||
ExoPlaybackException.createForTimeout(
|
||||
new TimeoutException("Setting foreground mode timed out."),
|
||||
ExoPlaybackException.TIMEOUT_OPERATION_SET_FOREGROUND_MODE)));
|
||||
}
|
||||
|
|
@ -724,7 +724,7 @@ import java.util.concurrent.TimeoutException;
|
|||
notifyListeners(
|
||||
listener ->
|
||||
listener.onPlayerError(
|
||||
ExoPlaybackException.createForTimeoutError(
|
||||
ExoPlaybackException.createForTimeout(
|
||||
new TimeoutException("Player release timed out."),
|
||||
ExoPlaybackException.TIMEOUT_OPERATION_RELEASE)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
} catch (RuntimeException | OutOfMemoryError e) {
|
||||
ExoPlaybackException error =
|
||||
e instanceof OutOfMemoryError
|
||||
? ExoPlaybackException.createForOutOfMemoryError((OutOfMemoryError) e)
|
||||
? ExoPlaybackException.createForOutOfMemory((OutOfMemoryError) e)
|
||||
: ExoPlaybackException.createForUnexpected((RuntimeException) e);
|
||||
Log.e(TAG, "Playback error", error);
|
||||
stopInternal(/* forceResetRenderers= */ true, /* acknowledgeStop= */ false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue