Transforms a Result by
making a subsequent API call.
| final PendingResult<S> | |
| Status | |
| abstract PendingResult<S> |
onSuccess(R result)
Transforms the result of a successful API call.
|
Creates a failed result with the given Status.
In the event of an error during
onSuccess(R), call this method and return the failed result.
Note: the PendingResult
generated by this method must be returned directly from
onSuccess(R). It is an error to call any methods on this PendingResult.
Called when the PendingResult to be transformed returns a failure. Default
implementation simply propagates the failure, but subclasses may override for custom
failure handling. This method is called on the main thread, unless overridden by
GoogleApiClient.Builder.setHandler(Handler).
| status | The status of the failure. |
|---|
Transforms the result of a successful API call. This method is called on a background thread and should not access UI elements.
| result | The successful result to be transformed. Never null. If this result is
Releasable
it will be automatically released after this transform is applied; it is not
necessary to release the result inside onSuccess. It is an error to set callbacks
on this result. Any callbacks set on this result will be overridden and will not be
called. |
|---|
null, which is translated into a Status
with code
CommonStatusCodes.ERROR; or
createFailedResult(Status).