public static final class DownloadManager.TaskState
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
DownloadManager.TaskState.State
Task states.
|
| Modifier and Type | Field and Description |
|---|---|
DownloadAction |
action
The action being executed.
|
long |
downloadedBytes
The total number of downloaded bytes.
|
float |
downloadPercentage
The estimated download percentage, or
C.PERCENTAGE_UNSET if no estimate is available
or if this is a removal task. |
java.lang.Throwable |
error
If
state is STATE_FAILED then this is the cause, otherwise null. |
int |
state
The state of the task.
|
static int |
STATE_CANCELED
The task was canceled.
|
static int |
STATE_COMPLETED
The task completed.
|
static int |
STATE_FAILED
The task failed.
|
static int |
STATE_QUEUED
The task is waiting to be started.
|
static int |
STATE_STARTED
The task is currently started.
|
int |
taskId
The unique task id.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getStateString(int state)
Returns the state string for the given state value.
|
public static final int STATE_QUEUED
public static final int STATE_STARTED
public static final int STATE_COMPLETED
public static final int STATE_CANCELED
public static final int STATE_FAILED
public final int taskId
public final DownloadAction action
public final int state
public final float downloadPercentage
C.PERCENTAGE_UNSET if no estimate is available
or if this is a removal task.public final long downloadedBytes
public final java.lang.Throwable error
state is STATE_FAILED then this is the cause, otherwise null.