- listener
- The cancellation listener, or null to remove the current listener.
Sets the cancellation listener to be called when canceled. This method is intended to be used by the recipient of a cancellation signal such as a database or a content provider to handle cancellation requests while performing a long-running operation. This method is not intended to be used by applications themselves. If CancellationSignal.Cancel has already been called, then the provided listener is invoked immediately. This method is guaranteed that the listener will not be called after it has been removed.