congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CancellationSignal.setOnCancelListener
Code IndexAdd Tabnine to your IDE (free)

How to use
setOnCancelListener
method
in
androidx.core.os.CancellationSignal

Best Java code snippets using androidx.core.os.CancellationSignal.setOnCancelListener (Showing top 4 results out of 315)

origin: requery/sqlite-android

@SuppressLint("Assert")
private void detachCancellationSignal(CancellationSignal cancellationSignal) {
  if (cancellationSignal != null) {
    assert mCancellationSignalAttachCount > 0;
    mCancellationSignalAttachCount -= 1;
    if (mCancellationSignalAttachCount == 0) {
      // After this point, onCancel() cannot be called concurrently.
      cancellationSignal.setOnCancelListener(null);
      // Reset cancellation flag after executing the statement.
      nativeResetCancel(mConnectionPtr, false /*cancelable*/);
    }
  }
}
origin: requery/sqlite-android

private void attachCancellationSignal(CancellationSignal cancellationSignal) {
  if (cancellationSignal != null) {
    cancellationSignal.throwIfCanceled();
    mCancellationSignalAttachCount += 1;
    if (mCancellationSignalAttachCount == 1) {
      // Reset cancellation flag before executing the statement.
      nativeResetCancel(mConnectionPtr, true /*cancelable*/);
      // After this point, onCancel() may be called concurrently.
      cancellationSignal.setOnCancelListener(this);
    }
  }
}
origin: requery/sqlite-android

cancellationSignal.setOnCancelListener(new CancellationSignal.OnCancelListener() {
  @Override
  public void onCancel() {
  cancellationSignal.setOnCancelListener(null);
origin: ajalt/reprint

cancellationSignal.setOnCancelListener(new CancellationSignal.OnCancelListener() {
  @Override
  public void onCancel() {
androidx.core.osCancellationSignalsetOnCancelListener

Popular methods of CancellationSignal

  • <init>
  • cancel
  • getCancellationSignalObject
  • isCanceled
  • throwIfCanceled

Popular in Java

  • Finding current android device location
  • getSupportFragmentManager (FragmentActivity)
  • setContentView (Activity)
  • requestLocationUpdates (LocationManager)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now