belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1
CancellationSignal
public
final
class
CancellationSignal
extends Object
java.lang.Object | |
↳ | android.support.v4.os.CancellationSignal |
Static library support version of the framework's CancellationSignal
.
Used to write apps that run on platforms prior to Android 4.1. See the framework SDK
documentation for a class overview.
Summary
Nested classes | |
---|---|
interface |
CancellationSignal.OnCancelListener
Listens for cancellation. |
Public constructors | |
---|---|
CancellationSignal()
Creates a cancellation signal, initially not canceled. |
Public methods | |
---|---|
void
|
cancel()
Cancels the operation and signals the cancellation listener. |
Object
|
getCancellationSignalObject()
Gets the framework |
boolean
|
isCanceled()
Returns true if the operation has been canceled. |
void
|
setOnCancelListener(CancellationSignal.OnCancelListener listener)
Sets the cancellation listener to be called when canceled. |
void
|
throwIfCanceled()
Throws |
Inherited methods | |
---|---|
![]()
java.lang.Object
|
Public constructors
CancellationSignal
CancellationSignal ()
Creates a cancellation signal, initially not canceled.
Public methods
cancel
void cancel ()
Cancels the operation and signals the cancellation listener. If the operation has not yet started, then it will be canceled as soon as it does.
getCancellationSignalObject
Object getCancellationSignalObject ()
Gets the framework CancellationSignal
associated with this object.
Framework support for cancellation signals was added in
JELLY_BEAN
so this method will always
return null on older versions of the platform.
Returns | |
---|---|
Object |
A framework cancellation signal object, or null on platform versions prior to Jellybean. |