public enum SambaPlayerError extends java.lang.Enum<SambaPlayerError>
| Modifier and Type | Class and Description |
|---|---|
static class |
SambaPlayerError.Severity
The severity of the error:
minor - dispatches error notification without showing the error screen
info - shows error screen without destroying the player
recoverable - display a retry button
critical - player must be destroyed
|
| Enum Constant and Description |
|---|
emptyUrl |
invalidUrl |
rootedDevice |
unknown |
| Modifier and Type | Method and Description |
|---|---|
int |
getCode()
The exception related code
|
int |
getDrawableRes() |
java.lang.Exception |
getException()
The exception related exception
|
java.lang.String |
getMessage()
The exception related message
|
SambaPlayerError.Severity |
getSeverity()
The severity of the error
|
SambaPlayerError |
setValues(int code,
java.lang.String message)
Replaces default exception message for current instance.
|
SambaPlayerError |
setValues(int code,
java.lang.String message,
SambaPlayerError.Severity severity)
Replaces default exception message for current instance.
|
SambaPlayerError |
setValues(int code,
java.lang.String message,
SambaPlayerError.Severity severity,
java.lang.Exception exception)
Replaces default exception message for current instance.
|
SambaPlayerError |
setValues(int code,
java.lang.String message,
SambaPlayerError.Severity severity,
java.lang.Exception exception,
int drawableRes)
Replaces default exception message for current instance.
|
java.lang.String |
toString() |
static SambaPlayerError |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SambaPlayerError[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SambaPlayerError invalidUrl
public static final SambaPlayerError emptyUrl
public static final SambaPlayerError rootedDevice
public static final SambaPlayerError unknown
public static SambaPlayerError[] values()
for (SambaPlayerError c : SambaPlayerError.values()) System.out.println(c);
public static SambaPlayerError valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic int getCode()
public java.lang.String getMessage()
public SambaPlayerError.Severity getSeverity()
public java.lang.Exception getException()
@DrawableRes public int getDrawableRes()
public SambaPlayerError setValues(int code, java.lang.String message, SambaPlayerError.Severity severity, java.lang.Exception exception, @DrawableRes int drawableRes)
code - The exception codemessage - The message to be replacedseverity - The severity of the errorexception - The exception related exceptiondrawableRes - A custom error image to show with the messagepublic SambaPlayerError setValues(int code, java.lang.String message, SambaPlayerError.Severity severity, java.lang.Exception exception)
code - The exception codemessage - The message to be replacedseverity - The severity of the errorexception - The exception related exceptionpublic SambaPlayerError setValues(int code, java.lang.String message, SambaPlayerError.Severity severity)
code - The exception codemessage - The message to be replacedseverity - The severity of the errorpublic SambaPlayerError setValues(int code, java.lang.String message)
code - The exception codemessage - The message to be replacedpublic java.lang.String toString()
toString in class java.lang.Enum<SambaPlayerError>