Commit 513b301e by olly Committed by kim-vde

ExoPlaybackException: Align some method naming

PiperOrigin-RevId: 327003695
parent 7ef31e22
......@@ -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);
......
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