An object that provides information about the execution of an asynchronous command being performed by
WorkManager. Operations are generally tied to enqueue or cancel commands; when you call one of those commands, they occur asynchronously. You can observe or await these commands by using the returned Operation.
The lifecycle state of an
@NonNull abstract fun getResult(): ListenableFuture<Operation.State.SUCCESS!>
ListenableFuture for the terminal state of the
Operation. This will only resolve with a
State.FAILURE state will come through as a
Throwable on the
State.IN_PROGRESS will never be reported as it's not a terminal state.