Builder
class Builder
kotlin.Any | |
↳ | 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(value: Int) Sets error code. |
PlaybackErrorEvent.Builder |
setException(value: Exception) Sets the |
PlaybackErrorEvent.Builder |
setMetricsBundle(metricsBundle: Bundle) Sets metrics-related information that is not supported by dedicated methods. |
PlaybackErrorEvent.Builder |
setSubErrorCode(value: Int) Sets sub error code. |
PlaybackErrorEvent.Builder |
setTimeSinceCreatedMillis(value: Long) Set the timestamp since creation in milliseconds. |
Public constructors
Public methods
build
fun build(): PlaybackErrorEvent
Builds the instance.
Return | |
---|---|
PlaybackErrorEvent |
This value cannot be null . |
setErrorCode
fun setErrorCode(value: Int): PlaybackErrorEvent.Builder
Sets error code.
Return | |
---|---|
PlaybackErrorEvent.Builder |
This value cannot be null . |
setException
fun setException(value: Exception): PlaybackErrorEvent.Builder
Sets the Exception
object.
Parameters | |
---|---|
value |
Exception: This value cannot be null . |
Return | |
---|---|
PlaybackErrorEvent.Builder |
This value cannot be null . |
setMetricsBundle
fun setMetricsBundle(metricsBundle: Bundle): PlaybackErrorEvent.Builder
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 . |
Return | |
---|---|
PlaybackErrorEvent.Builder |
This value cannot be null . |
setSubErrorCode
fun setSubErrorCode(value: Int): PlaybackErrorEvent.Builder
Sets sub error code.
Parameters | |
---|---|
value |
Int: Value is between Integer.MIN_VALUE and Integer.MAX_VALUE inclusive |
Return | |
---|---|
PlaybackErrorEvent.Builder |
This value cannot be null . |
setTimeSinceCreatedMillis
fun setTimeSinceCreatedMillis(value: Long): PlaybackErrorEvent.Builder
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 |
Return | |
---|---|
PlaybackErrorEvent.Builder |
This value cannot be null . |
See Also