mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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.
|
* @param cause The cause of the failure.
|
||||||
* @return The created instance.
|
* @return The created instance.
|
||||||
*/
|
*/
|
||||||
public static ExoPlaybackException createForOutOfMemoryError(OutOfMemoryError cause) {
|
public static ExoPlaybackException createForOutOfMemory(OutOfMemoryError cause) {
|
||||||
return new ExoPlaybackException(TYPE_OUT_OF_MEMORY, 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.
|
* @param timeoutOperation The operation that caused this timeout.
|
||||||
* @return The created instance.
|
* @return The created instance.
|
||||||
*/
|
*/
|
||||||
public static ExoPlaybackException createForTimeoutError(
|
public static ExoPlaybackException createForTimeout(
|
||||||
TimeoutException cause, @TimeoutOperation int timeoutOperation) {
|
TimeoutException cause, @TimeoutOperation int timeoutOperation) {
|
||||||
return new ExoPlaybackException(
|
return new ExoPlaybackException(
|
||||||
TYPE_OUT_OF_MEMORY,
|
TYPE_OUT_OF_MEMORY,
|
||||||
|
|
@ -348,7 +348,7 @@ public final class ExoPlaybackException extends Exception {
|
||||||
*
|
*
|
||||||
* @throws IllegalStateException If {@link #type} is not {@link #TYPE_TIMEOUT}.
|
* @throws IllegalStateException If {@link #type} is not {@link #TYPE_TIMEOUT}.
|
||||||
*/
|
*/
|
||||||
public TimeoutException getTimeoutError() {
|
public TimeoutException getTimeoutException() {
|
||||||
Assertions.checkState(type == TYPE_TIMEOUT);
|
Assertions.checkState(type == TYPE_TIMEOUT);
|
||||||
return (TimeoutException) Assertions.checkNotNull(cause);
|
return (TimeoutException) Assertions.checkNotNull(cause);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -683,7 +683,7 @@ import java.util.concurrent.TimeoutException;
|
||||||
notifyListeners(
|
notifyListeners(
|
||||||
listener ->
|
listener ->
|
||||||
listener.onPlayerError(
|
listener.onPlayerError(
|
||||||
ExoPlaybackException.createForTimeoutError(
|
ExoPlaybackException.createForTimeout(
|
||||||
new TimeoutException("Setting foreground mode timed out."),
|
new TimeoutException("Setting foreground mode timed out."),
|
||||||
ExoPlaybackException.TIMEOUT_OPERATION_SET_FOREGROUND_MODE)));
|
ExoPlaybackException.TIMEOUT_OPERATION_SET_FOREGROUND_MODE)));
|
||||||
}
|
}
|
||||||
|
|
@ -724,7 +724,7 @@ import java.util.concurrent.TimeoutException;
|
||||||
notifyListeners(
|
notifyListeners(
|
||||||
listener ->
|
listener ->
|
||||||
listener.onPlayerError(
|
listener.onPlayerError(
|
||||||
ExoPlaybackException.createForTimeoutError(
|
ExoPlaybackException.createForTimeout(
|
||||||
new TimeoutException("Player release timed out."),
|
new TimeoutException("Player release timed out."),
|
||||||
ExoPlaybackException.TIMEOUT_OPERATION_RELEASE)));
|
ExoPlaybackException.TIMEOUT_OPERATION_RELEASE)));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -557,7 +557,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
} catch (RuntimeException | OutOfMemoryError e) {
|
} catch (RuntimeException | OutOfMemoryError e) {
|
||||||
ExoPlaybackException error =
|
ExoPlaybackException error =
|
||||||
e instanceof OutOfMemoryError
|
e instanceof OutOfMemoryError
|
||||||
? ExoPlaybackException.createForOutOfMemoryError((OutOfMemoryError) e)
|
? ExoPlaybackException.createForOutOfMemory((OutOfMemoryError) e)
|
||||||
: ExoPlaybackException.createForUnexpected((RuntimeException) e);
|
: ExoPlaybackException.createForUnexpected((RuntimeException) e);
|
||||||
Log.e(TAG, "Playback error", error);
|
Log.e(TAG, "Playback error", error);
|
||||||
stopInternal(/* forceResetRenderers= */ true, /* acknowledgeStop= */ false);
|
stopInternal(/* forceResetRenderers= */ true, /* acknowledgeStop= */ false);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue