PlaybackErrorEvent.Builder
public
static
final
class
PlaybackErrorEvent.Builder
extends Object
| java.lang.Object | |
| ↳ | android.media.metrics.PlaybackErrorEvent.Builder |
A builder for PlaybackErrorEvent
Summary
Public constructors | |
|---|---|
Builder()
Creates a new Builder. |
|
Public methods | |
|---|---|
PlaybackErrorEvent
|
build()
Builds the instance. |
PlaybackErrorEvent.Builder
|
setErrorCode(int value)
Sets error code. |
PlaybackErrorEvent.Builder
|
setException(Exception value)
Sets the |
PlaybackErrorEvent.Builder
|
setMetricsBundle(Bundle metricsBundle)
Sets metrics-related information that is not supported by dedicated methods. |
PlaybackErrorEvent.Builder
|
setSubErrorCode(int value)
Sets sub error code. |
PlaybackErrorEvent.Builder
|
setTimeSinceCreatedMillis(long value)
Set the timestamp since creation in milliseconds. |
Inherited methods | |
|---|---|
Public constructors
Public methods
build
public PlaybackErrorEvent build ()
Builds the instance.
| Returns | |
|---|---|
PlaybackErrorEvent |
This value cannot be null. |
setErrorCode
public PlaybackErrorEvent.Builder setErrorCode (int value)
Sets error code.
| Returns | |
|---|---|
PlaybackErrorEvent.Builder |
This value cannot be null. |
setException
public PlaybackErrorEvent.Builder setException (Exception value)
Sets the Exception object.
| Parameters | |
|---|---|
value |
Exception: This value cannot be null. |
| Returns | |
|---|---|
PlaybackErrorEvent.Builder |
This value cannot be null. |
setMetricsBundle
public PlaybackErrorEvent.Builder setMetricsBundle (Bundle metricsBundle)
Sets metrics-related information that is not supported by dedicated methods.
It is intended to be used for backwards compatibility by the metrics infrastructure.
| Parameters | |
|---|---|
metricsBundle |
Bundle: This value cannot be null. |
| Returns | |
|---|---|
PlaybackErrorEvent.Builder |
This value cannot be null. |
setSubErrorCode
public PlaybackErrorEvent.Builder setSubErrorCode (int value)
Sets sub error code.
| Parameters | |
|---|---|
value |
int: Value is between Integer.MIN_VALUE and Integer.MAX_VALUE inclusive |
| Returns | |
|---|---|
PlaybackErrorEvent.Builder |
This value cannot be null. |
setTimeSinceCreatedMillis
public PlaybackErrorEvent.Builder setTimeSinceCreatedMillis (long value)
Set the timestamp since creation in milliseconds.
| Parameters | |
|---|---|
value |
long: the timestamp since the creation in milliseconds.
-1 indicates the value is unknown.
Value is -1 or greater |
| Returns | |
|---|---|
PlaybackErrorEvent.Builder |
This value cannot be null. |