.class public Lbolts/Task; .super Ljava/lang/Object; .source "Task.java" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lbolts/Task$TaskCompletionSource;, Lbolts/Task$UnobservedExceptionHandler; } .end annotation .annotation system Ldalvik/annotation/Signature; value = { "", "Ljava/lang/Object;" } .end annotation # static fields .field public static final BACKGROUND_EXECUTOR:Ljava/util/concurrent/ExecutorService; .field private static final IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; .field private static TASK_CANCELLED:Lbolts/Task; .annotation system Ldalvik/annotation/Signature; value = { "Lbolts/Task", "<*>;" } .end annotation .end field .field private static TASK_FALSE:Lbolts/Task; .annotation system Ldalvik/annotation/Signature; value = { "Lbolts/Task", "<", "Ljava/lang/Boolean;", ">;" } .end annotation .end field .field private static TASK_NULL:Lbolts/Task; .annotation system Ldalvik/annotation/Signature; value = { "Lbolts/Task", "<*>;" } .end annotation .end field .field private static TASK_TRUE:Lbolts/Task; .annotation system Ldalvik/annotation/Signature; value = { "Lbolts/Task", "<", "Ljava/lang/Boolean;", ">;" } .end annotation .end field .field public static final UI_THREAD_EXECUTOR:Ljava/util/concurrent/Executor; .field private static volatile unobservedExceptionHandler:Lbolts/Task$UnobservedExceptionHandler; # instance fields .field private cancelled:Z .field private complete:Z .field private continuations:Ljava/util/List; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/List", "<", "Lbolts/Continuation", ";>;" } .end annotation .end field .field private error:Ljava/lang/Exception; .field private errorHasBeenObserved:Z .field private final lock:Ljava/lang/Object; .field private result:Ljava/lang/Object; .annotation system Ldalvik/annotation/Signature; value = { "TTResult;" } .end annotation .end field .field private unobservedErrorNotifier:Lbolts/UnobservedErrorNotifier; # direct methods .method static constructor ()V .locals 3 .prologue const/4 v2, 0x1 .line 36 invoke-static {}, Lbolts/BoltsExecutors;->background()Ljava/util/concurrent/ExecutorService; move-result-object v0 sput-object v0, Lbolts/Task;->BACKGROUND_EXECUTOR:Ljava/util/concurrent/ExecutorService; .line 43 invoke-static {}, Lbolts/BoltsExecutors;->immediate()Ljava/util/concurrent/Executor; move-result-object v0 sput-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; .line 48 invoke-static {}, Lbolts/AndroidExecutors;->uiThread()Ljava/util/concurrent/Executor; move-result-object v0 sput-object v0, Lbolts/Task;->UI_THREAD_EXECUTOR:Ljava/util/concurrent/Executor; .line 1027 new-instance v0, Lbolts/Task; const/4 v1, 0x0 invoke-direct {v0, v1}, Lbolts/Task;->(Ljava/lang/Object;)V sput-object v0, Lbolts/Task;->TASK_NULL:Lbolts/Task; .line 1028 new-instance v0, Lbolts/Task; invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; move-result-object v1 invoke-direct {v0, v1}, Lbolts/Task;->(Ljava/lang/Object;)V sput-object v0, Lbolts/Task;->TASK_TRUE:Lbolts/Task; .line 1029 new-instance v0, Lbolts/Task; const/4 v1, 0x0 invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; move-result-object v1 invoke-direct {v0, v1}, Lbolts/Task;->(Ljava/lang/Object;)V sput-object v0, Lbolts/Task;->TASK_FALSE:Lbolts/Task; .line 1030 new-instance v0, Lbolts/Task; invoke-direct {v0, v2}, Lbolts/Task;->(Z)V sput-object v0, Lbolts/Task;->TASK_CANCELLED:Lbolts/Task; return-void .end method .method constructor ()V .locals 1 .prologue .line 100 invoke-direct {p0}, Ljava/lang/Object;->()V .line 91 new-instance v0, Ljava/lang/Object; invoke-direct {v0}, Ljava/lang/Object;->()V iput-object v0, p0, Lbolts/Task;->lock:Ljava/lang/Object; .line 98 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V iput-object v0, p0, Lbolts/Task;->continuations:Ljava/util/List; .line 101 return-void .end method .method private constructor (Ljava/lang/Object;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(TTResult;)V" } .end annotation .prologue .line 103 invoke-direct {p0}, Ljava/lang/Object;->()V .line 91 new-instance v0, Ljava/lang/Object; invoke-direct {v0}, Ljava/lang/Object;->()V iput-object v0, p0, Lbolts/Task;->lock:Ljava/lang/Object; .line 98 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V iput-object v0, p0, Lbolts/Task;->continuations:Ljava/util/List; .line 104 invoke-virtual {p0, p1}, Lbolts/Task;->trySetResult(Ljava/lang/Object;)Z .line 105 return-void .end method .method private constructor (Z)V .locals 1 .prologue .line 107 invoke-direct {p0}, Ljava/lang/Object;->()V .line 91 new-instance v0, Ljava/lang/Object; invoke-direct {v0}, Ljava/lang/Object;->()V iput-object v0, p0, Lbolts/Task;->lock:Ljava/lang/Object; .line 98 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V iput-object v0, p0, Lbolts/Task;->continuations:Ljava/util/List; .line 108 if-eqz p1, :cond_0 .line 109 invoke-virtual {p0}, Lbolts/Task;->trySetCancelled()Z .line 113 :goto_0 return-void .line 111 :cond_0 const/4 v0, 0x0 invoke-virtual {p0, v0}, Lbolts/Task;->trySetResult(Ljava/lang/Object;)Z goto :goto_0 .end method .method static synthetic access$000(Lbolts/TaskCompletionSource;Lbolts/Continuation;Lbolts/Task;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)V .locals 0 .prologue .line 32 invoke-static {p0, p1, p2, p3, p4}, Lbolts/Task;->completeImmediately(Lbolts/TaskCompletionSource;Lbolts/Continuation;Lbolts/Task;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)V return-void .end method .method static synthetic access$100(Lbolts/TaskCompletionSource;Lbolts/Continuation;Lbolts/Task;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)V .locals 0 .prologue .line 32 invoke-static {p0, p1, p2, p3, p4}, Lbolts/Task;->completeAfterTask(Lbolts/TaskCompletionSource;Lbolts/Continuation;Lbolts/Task;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)V return-void .end method .method public static call(Ljava/util/concurrent/Callable;)Lbolts/Task; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/concurrent/Callable", ";)", "Lbolts/Task", ";" } .end annotation .prologue .line 379 sget-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; const/4 v1, 0x0 invoke-static {p0, v0, v1}, Lbolts/Task;->call(Ljava/util/concurrent/Callable;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public static call(Ljava/util/concurrent/Callable;Lbolts/CancellationToken;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/concurrent/Callable", ";", "Lbolts/CancellationToken;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 386 sget-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; invoke-static {p0, v0, p1}, Lbolts/Task;->call(Ljava/util/concurrent/Callable;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public static call(Ljava/util/concurrent/Callable;Ljava/util/concurrent/Executor;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/concurrent/Callable", ";", "Ljava/util/concurrent/Executor;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 338 const/4 v0, 0x0 invoke-static {p0, p1, v0}, Lbolts/Task;->call(Ljava/util/concurrent/Callable;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public static call(Ljava/util/concurrent/Callable;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/concurrent/Callable", ";", "Ljava/util/concurrent/Executor;", "Lbolts/CancellationToken;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 346 new-instance v1, Lbolts/TaskCompletionSource; invoke-direct {v1}, Lbolts/TaskCompletionSource;->()V .line 348 :try_start_0 new-instance v0, Lbolts/Task$4; invoke-direct {v0, p2, v1, p0}, Lbolts/Task$4;->(Lbolts/CancellationToken;Lbolts/TaskCompletionSource;Ljava/util/concurrent/Callable;)V invoke-interface {p1, v0}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 .line 369 :goto_0 invoke-virtual {v1}, Lbolts/TaskCompletionSource;->getTask()Lbolts/Task; move-result-object v0 return-object v0 .line 365 :catch_0 move-exception v0 .line 366 new-instance v2, Lbolts/ExecutorException; invoke-direct {v2, v0}, Lbolts/ExecutorException;->(Ljava/lang/Exception;)V invoke-virtual {v1, v2}, Lbolts/TaskCompletionSource;->setError(Ljava/lang/Exception;)V goto :goto_0 .end method .method public static callInBackground(Ljava/util/concurrent/Callable;)Lbolts/Task; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/concurrent/Callable", ";)", "Lbolts/Task", ";" } .end annotation .prologue .line 321 sget-object v0, Lbolts/Task;->BACKGROUND_EXECUTOR:Ljava/util/concurrent/ExecutorService; const/4 v1, 0x0 invoke-static {p0, v0, v1}, Lbolts/Task;->call(Ljava/util/concurrent/Callable;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public static callInBackground(Ljava/util/concurrent/Callable;Lbolts/CancellationToken;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/concurrent/Callable", ";", "Lbolts/CancellationToken;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 328 sget-object v0, Lbolts/Task;->BACKGROUND_EXECUTOR:Ljava/util/concurrent/ExecutorService; invoke-static {p0, v0, p1}, Lbolts/Task;->call(Ljava/util/concurrent/Callable;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public static cancelled()Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lbolts/Task", ";" } .end annotation .prologue .line 231 sget-object v0, Lbolts/Task;->TASK_CANCELLED:Lbolts/Task; return-object v0 .end method .method private static completeAfterTask(Lbolts/TaskCompletionSource;Lbolts/Continuation;Lbolts/Task;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/TaskCompletionSource", ";", "Lbolts/Continuation", ";>;", "Lbolts/Task", ";", "Ljava/util/concurrent/Executor;", "Lbolts/CancellationToken;", ")V" } .end annotation .prologue .line 908 :try_start_0 new-instance v0, Lbolts/Task$15; invoke-direct {v0, p4, p0, p1, p2}, Lbolts/Task$15;->(Lbolts/CancellationToken;Lbolts/TaskCompletionSource;Lbolts/Continuation;Lbolts/Task;)V invoke-interface {p3, v0}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 .line 950 :goto_0 return-void .line 947 :catch_0 move-exception v0 .line 948 new-instance v1, Lbolts/ExecutorException; invoke-direct {v1, v0}, Lbolts/ExecutorException;->(Ljava/lang/Exception;)V invoke-virtual {p0, v1}, Lbolts/TaskCompletionSource;->setError(Ljava/lang/Exception;)V goto :goto_0 .end method .method private static completeImmediately(Lbolts/TaskCompletionSource;Lbolts/Continuation;Lbolts/Task;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/TaskCompletionSource", ";", "Lbolts/Continuation", ";", "Lbolts/Task", ";", "Ljava/util/concurrent/Executor;", "Lbolts/CancellationToken;", ")V" } .end annotation .prologue .line 863 :try_start_0 new-instance v0, Lbolts/Task$14; invoke-direct {v0, p4, p0, p1, p2}, Lbolts/Task$14;->(Lbolts/CancellationToken;Lbolts/TaskCompletionSource;Lbolts/Continuation;Lbolts/Task;)V invoke-interface {p3, v0}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 .line 884 :goto_0 return-void .line 881 :catch_0 move-exception v0 .line 882 new-instance v1, Lbolts/ExecutorException; invoke-direct {v1, v0}, Lbolts/ExecutorException;->(Ljava/lang/Exception;)V invoke-virtual {p0, v1}, Lbolts/TaskCompletionSource;->setError(Ljava/lang/Exception;)V goto :goto_0 .end method .method public static create()Lbolts/Task$TaskCompletionSource; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lbolts/Task", ".TaskCompletionSource;" } .end annotation .prologue .line 119 new-instance v0, Lbolts/Task; invoke-direct {v0}, Lbolts/Task;->()V .line 120 new-instance v1, Lbolts/Task$TaskCompletionSource; invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class; invoke-direct {v1, v0}, Lbolts/Task$TaskCompletionSource;->(Lbolts/Task;)V return-object v1 .end method .method public static delay(J)Lbolts/Task; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(J)", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;" } .end annotation .prologue .line 241 invoke-static {}, Lbolts/BoltsExecutors;->scheduled()Ljava/util/concurrent/ScheduledExecutorService; move-result-object v0 const/4 v1, 0x0 invoke-static {p0, p1, v0, v1}, Lbolts/Task;->delay(JLjava/util/concurrent/ScheduledExecutorService;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public static delay(JLbolts/CancellationToken;)Lbolts/Task; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(J", "Lbolts/CancellationToken;", ")", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;" } .end annotation .prologue .line 253 invoke-static {}, Lbolts/BoltsExecutors;->scheduled()Ljava/util/concurrent/ScheduledExecutorService; move-result-object v0 invoke-static {p0, p1, v0, p2}, Lbolts/Task;->delay(JLjava/util/concurrent/ScheduledExecutorService;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method static delay(JLjava/util/concurrent/ScheduledExecutorService;Lbolts/CancellationToken;)Lbolts/Task; .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "(J", "Ljava/util/concurrent/ScheduledExecutorService;", "Lbolts/CancellationToken;", ")", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;" } .end annotation .prologue .line 257 if-eqz p3, :cond_0 invoke-virtual {p3}, Lbolts/CancellationToken;->isCancellationRequested()Z move-result v0 if-eqz v0, :cond_0 .line 258 invoke-static {}, Lbolts/Task;->cancelled()Lbolts/Task; move-result-object v0 .line 283 :goto_0 return-object v0 .line 261 :cond_0 const-wide/16 v0, 0x0 cmp-long v0, p0, v0 if-gtz v0, :cond_1 .line 262 const/4 v0, 0x0 invoke-static {v0}, Lbolts/Task;->forResult(Ljava/lang/Object;)Lbolts/Task; move-result-object v0 goto :goto_0 .line 265 :cond_1 new-instance v0, Lbolts/TaskCompletionSource; invoke-direct {v0}, Lbolts/TaskCompletionSource;->()V .line 266 new-instance v1, Lbolts/Task$1; invoke-direct {v1, v0}, Lbolts/Task$1;->(Lbolts/TaskCompletionSource;)V sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit; invoke-interface {p2, v1, p0, p1, v2}, Ljava/util/concurrent/ScheduledExecutorService;->schedule(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture; move-result-object v1 .line 273 if-eqz p3, :cond_2 .line 274 new-instance v2, Lbolts/Task$2; invoke-direct {v2, v1, v0}, Lbolts/Task$2;->(Ljava/util/concurrent/ScheduledFuture;Lbolts/TaskCompletionSource;)V invoke-virtual {p3, v2}, Lbolts/CancellationToken;->register(Ljava/lang/Runnable;)Lbolts/CancellationTokenRegistration; .line 283 :cond_2 invoke-virtual {v0}, Lbolts/TaskCompletionSource;->getTask()Lbolts/Task; move-result-object v0 goto :goto_0 .end method .method public static forError(Ljava/lang/Exception;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Exception;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 221 new-instance v0, Lbolts/TaskCompletionSource; invoke-direct {v0}, Lbolts/TaskCompletionSource;->()V .line 222 invoke-virtual {v0, p0}, Lbolts/TaskCompletionSource;->setError(Ljava/lang/Exception;)V .line 223 invoke-virtual {v0}, Lbolts/TaskCompletionSource;->getTask()Lbolts/Task; move-result-object v0 return-object v0 .end method .method public static forResult(Ljava/lang/Object;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(TTResult;)", "Lbolts/Task", ";" } .end annotation .prologue .line 206 if-nez p0, :cond_0 .line 207 sget-object v0, Lbolts/Task;->TASK_NULL:Lbolts/Task; .line 214 :goto_0 return-object v0 .line 209 :cond_0 instance-of v0, p0, Ljava/lang/Boolean; if-eqz v0, :cond_2 .line 210 check-cast p0, Ljava/lang/Boolean; invoke-virtual {p0}, Ljava/lang/Boolean;->booleanValue()Z move-result v0 if-eqz v0, :cond_1 sget-object v0, Lbolts/Task;->TASK_TRUE:Lbolts/Task; goto :goto_0 :cond_1 sget-object v0, Lbolts/Task;->TASK_FALSE:Lbolts/Task; goto :goto_0 .line 212 :cond_2 new-instance v0, Lbolts/TaskCompletionSource; invoke-direct {v0}, Lbolts/TaskCompletionSource;->()V .line 213 invoke-virtual {v0, p0}, Lbolts/TaskCompletionSource;->setResult(Ljava/lang/Object;)V .line 214 invoke-virtual {v0}, Lbolts/TaskCompletionSource;->getTask()Lbolts/Task; move-result-object v0 goto :goto_0 .end method .method public static getUnobservedExceptionHandler()Lbolts/Task$UnobservedExceptionHandler; .locals 1 .prologue .line 79 sget-object v0, Lbolts/Task;->unobservedExceptionHandler:Lbolts/Task$UnobservedExceptionHandler; return-object v0 .end method .method private runContinuations()V .locals 3 .prologue .line 953 iget-object v1, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v1 .line 954 :try_start_0 iget-object v0, p0, Lbolts/Task;->continuations:Ljava/util/List; invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator; move-result-object v2 :goto_0 invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_0 invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Lbolts/Continuation; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 956 :try_start_1 invoke-interface {v0, p0}, Lbolts/Continuation;->then(Lbolts/Task;)Ljava/lang/Object; :try_end_1 .catch Ljava/lang/RuntimeException; {:try_start_1 .. :try_end_1} :catch_0 .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 goto :goto_0 .line 957 :catch_0 move-exception v0 .line 958 :try_start_2 throw v0 .line 964 :catchall_0 move-exception v0 monitor-exit v1 :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_0 throw v0 .line 959 :catch_1 move-exception v0 .line 960 :try_start_3 new-instance v2, Ljava/lang/RuntimeException; invoke-direct {v2, v0}, Ljava/lang/RuntimeException;->(Ljava/lang/Throwable;)V throw v2 .line 963 :cond_0 const/4 v0, 0x0 iput-object v0, p0, Lbolts/Task;->continuations:Ljava/util/List; .line 964 monitor-exit v1 :try_end_3 .catchall {:try_start_3 .. :try_end_3} :catchall_0 .line 965 return-void .end method .method public static setUnobservedExceptionHandler(Lbolts/Task$UnobservedExceptionHandler;)V .locals 0 .prologue .line 88 sput-object p0, Lbolts/Task;->unobservedExceptionHandler:Lbolts/Task$UnobservedExceptionHandler; .line 89 return-void .end method .method public static whenAll(Ljava/util/Collection;)Lbolts/Task; .locals 8 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", "<+", "Lbolts/Task", "<*>;>;)", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;" } .end annotation .prologue .line 525 invoke-interface {p0}, Ljava/util/Collection;->size()I move-result v0 if-nez v0, :cond_0 .line 526 const/4 v0, 0x0 invoke-static {v0}, Lbolts/Task;->forResult(Ljava/lang/Object;)Lbolts/Task; move-result-object v0 .line 572 :goto_0 return-object v0 .line 529 :cond_0 new-instance v5, Lbolts/TaskCompletionSource; invoke-direct {v5}, Lbolts/TaskCompletionSource;->()V .line 530 new-instance v2, Ljava/util/ArrayList; invoke-direct {v2}, Ljava/util/ArrayList;->()V .line 531 new-instance v1, Ljava/lang/Object; invoke-direct {v1}, Ljava/lang/Object;->()V .line 532 new-instance v4, Ljava/util/concurrent/atomic/AtomicInteger; invoke-interface {p0}, Ljava/util/Collection;->size()I move-result v0 invoke-direct {v4, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->(I)V .line 533 new-instance v3, Ljava/util/concurrent/atomic/AtomicBoolean; const/4 v0, 0x0 invoke-direct {v3, v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->(Z)V .line 535 invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object v7 :goto_1 invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_1 invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 move-object v6, v0 check-cast v6, Lbolts/Task; .line 538 new-instance v0, Lbolts/Task$8; invoke-direct/range {v0 .. v5}, Lbolts/Task$8;->(Ljava/lang/Object;Ljava/util/ArrayList;Ljava/util/concurrent/atomic/AtomicBoolean;Ljava/util/concurrent/atomic/AtomicInteger;Lbolts/TaskCompletionSource;)V invoke-virtual {v6, v0}, Lbolts/Task;->continueWith(Lbolts/Continuation;)Lbolts/Task; goto :goto_1 .line 572 :cond_1 invoke-virtual {v5}, Lbolts/TaskCompletionSource;->getTask()Lbolts/Task; move-result-object v0 goto :goto_0 .end method .method public static whenAllResult(Ljava/util/Collection;)Lbolts/Task; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", "<+", "Lbolts/Task", ";>;)", "Lbolts/Task", "<", "Ljava/util/List", ";>;" } .end annotation .prologue .line 488 invoke-static {p0}, Lbolts/Task;->whenAll(Ljava/util/Collection;)Lbolts/Task; move-result-object v0 new-instance v1, Lbolts/Task$7; invoke-direct {v1, p0}, Lbolts/Task$7;->(Ljava/util/Collection;)V invoke-virtual {v0, v1}, Lbolts/Task;->onSuccess(Lbolts/Continuation;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public static whenAny(Ljava/util/Collection;)Lbolts/Task; .locals 5 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", "<+", "Lbolts/Task", "<*>;>;)", "Lbolts/Task", "<", "Lbolts/Task", "<*>;>;" } .end annotation .prologue .line 439 invoke-interface {p0}, Ljava/util/Collection;->size()I move-result v0 if-nez v0, :cond_0 .line 440 const/4 v0, 0x0 invoke-static {v0}, Lbolts/Task;->forResult(Ljava/lang/Object;)Lbolts/Task; move-result-object v0 .line 459 :goto_0 return-object v0 .line 443 :cond_0 new-instance v1, Lbolts/TaskCompletionSource; invoke-direct {v1}, Lbolts/TaskCompletionSource;->()V .line 444 new-instance v2, Ljava/util/concurrent/atomic/AtomicBoolean; const/4 v0, 0x0 invoke-direct {v2, v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->(Z)V .line 446 invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object v3 :goto_1 invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_1 invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Lbolts/Task; .line 447 new-instance v4, Lbolts/Task$6; invoke-direct {v4, v2, v1}, Lbolts/Task$6;->(Ljava/util/concurrent/atomic/AtomicBoolean;Lbolts/TaskCompletionSource;)V invoke-virtual {v0, v4}, Lbolts/Task;->continueWith(Lbolts/Continuation;)Lbolts/Task; goto :goto_1 .line 459 :cond_1 invoke-virtual {v1}, Lbolts/TaskCompletionSource;->getTask()Lbolts/Task; move-result-object v0 goto :goto_0 .end method .method public static whenAnyResult(Ljava/util/Collection;)Lbolts/Task; .locals 5 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", "<+", "Lbolts/Task", ";>;)", "Lbolts/Task", "<", "Lbolts/Task", ";>;" } .end annotation .prologue .line 402 invoke-interface {p0}, Ljava/util/Collection;->size()I move-result v0 if-nez v0, :cond_0 .line 403 const/4 v0, 0x0 invoke-static {v0}, Lbolts/Task;->forResult(Ljava/lang/Object;)Lbolts/Task; move-result-object v0 .line 422 :goto_0 return-object v0 .line 406 :cond_0 new-instance v1, Lbolts/TaskCompletionSource; invoke-direct {v1}, Lbolts/TaskCompletionSource;->()V .line 407 new-instance v2, Ljava/util/concurrent/atomic/AtomicBoolean; const/4 v0, 0x0 invoke-direct {v2, v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->(Z)V .line 409 invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object v3 :goto_1 invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_1 invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Lbolts/Task; .line 410 new-instance v4, Lbolts/Task$5; invoke-direct {v4, v2, v1}, Lbolts/Task$5;->(Ljava/util/concurrent/atomic/AtomicBoolean;Lbolts/TaskCompletionSource;)V invoke-virtual {v0, v4}, Lbolts/Task;->continueWith(Lbolts/Continuation;)Lbolts/Task; goto :goto_1 .line 422 :cond_1 invoke-virtual {v1}, Lbolts/TaskCompletionSource;->getTask()Lbolts/Task; move-result-object v0 goto :goto_0 .end method # virtual methods .method public cast()Lbolts/Task; .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lbolts/Task", ";" } .end annotation .prologue .line 292 .line 293 return-object p0 .end method .method public continueWhile(Ljava/util/concurrent/Callable;Lbolts/Continuation;)Lbolts/Task; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/concurrent/Callable", "<", "Ljava/lang/Boolean;", ">;", "Lbolts/Continuation", "<", "Ljava/lang/Void;", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;>;)", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;" } .end annotation .prologue .line 581 sget-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; const/4 v1, 0x0 invoke-virtual {p0, p1, p2, v0, v1}, Lbolts/Task;->continueWhile(Ljava/util/concurrent/Callable;Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public continueWhile(Ljava/util/concurrent/Callable;Lbolts/Continuation;Lbolts/CancellationToken;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/concurrent/Callable", "<", "Ljava/lang/Boolean;", ">;", "Lbolts/Continuation", "<", "Ljava/lang/Void;", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;>;", "Lbolts/CancellationToken;", ")", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;" } .end annotation .prologue .line 590 sget-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; invoke-virtual {p0, p1, p2, v0, p3}, Lbolts/Task;->continueWhile(Ljava/util/concurrent/Callable;Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public continueWhile(Ljava/util/concurrent/Callable;Lbolts/Continuation;Ljava/util/concurrent/Executor;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/concurrent/Callable", "<", "Ljava/lang/Boolean;", ">;", "Lbolts/Continuation", "<", "Ljava/lang/Void;", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;>;", "Ljava/util/concurrent/Executor;", ")", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;" } .end annotation .prologue .line 599 const/4 v0, 0x0 invoke-virtual {p0, p1, p2, p3, v0}, Lbolts/Task;->continueWhile(Ljava/util/concurrent/Callable;Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public continueWhile(Ljava/util/concurrent/Callable;Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; .locals 7 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/concurrent/Callable", "<", "Ljava/lang/Boolean;", ">;", "Lbolts/Continuation", "<", "Ljava/lang/Void;", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;>;", "Ljava/util/concurrent/Executor;", "Lbolts/CancellationToken;", ")", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;" } .end annotation .prologue .line 609 new-instance v6, Lbolts/Capture; invoke-direct {v6}, Lbolts/Capture;->()V .line 611 new-instance v0, Lbolts/Task$9; move-object v1, p0 move-object v2, p4 move-object v3, p1 move-object v4, p2 move-object v5, p3 invoke-direct/range {v0 .. v6}, Lbolts/Task$9;->(Lbolts/Task;Lbolts/CancellationToken;Ljava/util/concurrent/Callable;Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/Capture;)V invoke-virtual {v6, v0}, Lbolts/Capture;->set(Ljava/lang/Object;)V .line 625 invoke-virtual {p0}, Lbolts/Task;->makeVoid()Lbolts/Task; move-result-object v1 invoke-virtual {v6}, Lbolts/Capture;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Lbolts/Continuation; invoke-virtual {v1, v0, p3}, Lbolts/Task;->continueWithTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public continueWith(Lbolts/Continuation;)Lbolts/Task; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";)", "Lbolts/Task", ";" } .end annotation .prologue .line 672 sget-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; const/4 v1, 0x0 invoke-virtual {p0, p1, v0, v1}, Lbolts/Task;->continueWith(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public continueWith(Lbolts/Continuation;Lbolts/CancellationToken;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";", "Lbolts/CancellationToken;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 681 sget-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; invoke-virtual {p0, p1, v0, p2}, Lbolts/Task;->continueWith(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public continueWith(Lbolts/Continuation;Ljava/util/concurrent/Executor;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";", "Ljava/util/concurrent/Executor;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 635 const/4 v0, 0x0 invoke-virtual {p0, p1, p2, v0}, Lbolts/Task;->continueWith(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public continueWith(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; .locals 9 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";", "Ljava/util/concurrent/Executor;", "Lbolts/CancellationToken;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 647 new-instance v2, Lbolts/TaskCompletionSource; invoke-direct {v2}, Lbolts/TaskCompletionSource;->()V .line 648 iget-object v6, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v6 .line 649 :try_start_0 invoke-virtual {p0}, Lbolts/Task;->isCompleted()Z move-result v7 .line 650 if-nez v7, :cond_0 .line 651 iget-object v8, p0, Lbolts/Task;->continuations:Ljava/util/List; new-instance v0, Lbolts/Task$10; move-object v1, p0 move-object v3, p1 move-object v4, p2 move-object v5, p3 invoke-direct/range {v0 .. v5}, Lbolts/Task$10;->(Lbolts/Task;Lbolts/TaskCompletionSource;Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)V invoke-interface {v8, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z .line 659 :cond_0 monitor-exit v6 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 660 if-eqz v7, :cond_1 .line 661 invoke-static {v2, p1, p0, p2, p3}, Lbolts/Task;->completeImmediately(Lbolts/TaskCompletionSource;Lbolts/Continuation;Lbolts/Task;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)V .line 663 :cond_1 invoke-virtual {v2}, Lbolts/TaskCompletionSource;->getTask()Lbolts/Task; move-result-object v0 return-object v0 .line 659 :catchall_0 move-exception v0 :try_start_1 monitor-exit v6 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw v0 .end method .method public continueWithTask(Lbolts/Continuation;)Lbolts/Task; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";>;)", "Lbolts/Task", ";" } .end annotation .prologue .line 726 sget-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; const/4 v1, 0x0 invoke-virtual {p0, p1, v0, v1}, Lbolts/Task;->continueWithTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public continueWithTask(Lbolts/Continuation;Lbolts/CancellationToken;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";>;", "Lbolts/CancellationToken;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 735 sget-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; invoke-virtual {p0, p1, v0, p2}, Lbolts/Task;->continueWithTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public continueWithTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";>;", "Ljava/util/concurrent/Executor;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 690 const/4 v0, 0x0 invoke-virtual {p0, p1, p2, v0}, Lbolts/Task;->continueWithTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public continueWithTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; .locals 9 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";>;", "Ljava/util/concurrent/Executor;", "Lbolts/CancellationToken;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 701 new-instance v2, Lbolts/TaskCompletionSource; invoke-direct {v2}, Lbolts/TaskCompletionSource;->()V .line 702 iget-object v6, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v6 .line 703 :try_start_0 invoke-virtual {p0}, Lbolts/Task;->isCompleted()Z move-result v7 .line 704 if-nez v7, :cond_0 .line 705 iget-object v8, p0, Lbolts/Task;->continuations:Ljava/util/List; new-instance v0, Lbolts/Task$11; move-object v1, p0 move-object v3, p1 move-object v4, p2 move-object v5, p3 invoke-direct/range {v0 .. v5}, Lbolts/Task$11;->(Lbolts/Task;Lbolts/TaskCompletionSource;Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)V invoke-interface {v8, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z .line 713 :cond_0 monitor-exit v6 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 714 if-eqz v7, :cond_1 .line 715 invoke-static {v2, p1, p0, p2, p3}, Lbolts/Task;->completeAfterTask(Lbolts/TaskCompletionSource;Lbolts/Continuation;Lbolts/Task;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)V .line 717 :cond_1 invoke-virtual {v2}, Lbolts/TaskCompletionSource;->getTask()Lbolts/Task; move-result-object v0 return-object v0 .line 713 :catchall_0 move-exception v0 :try_start_1 monitor-exit v6 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw v0 .end method .method public getError()Ljava/lang/Exception; .locals 2 .prologue .line 164 iget-object v1, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v1 .line 165 :try_start_0 iget-object v0, p0, Lbolts/Task;->error:Ljava/lang/Exception; if-eqz v0, :cond_0 .line 166 const/4 v0, 0x1 iput-boolean v0, p0, Lbolts/Task;->errorHasBeenObserved:Z .line 167 iget-object v0, p0, Lbolts/Task;->unobservedErrorNotifier:Lbolts/UnobservedErrorNotifier; if-eqz v0, :cond_0 .line 168 iget-object v0, p0, Lbolts/Task;->unobservedErrorNotifier:Lbolts/UnobservedErrorNotifier; invoke-virtual {v0}, Lbolts/UnobservedErrorNotifier;->setObserved()V .line 169 const/4 v0, 0x0 iput-object v0, p0, Lbolts/Task;->unobservedErrorNotifier:Lbolts/UnobservedErrorNotifier; .line 172 :cond_0 iget-object v0, p0, Lbolts/Task;->error:Ljava/lang/Exception; monitor-exit v1 return-object v0 .line 173 :catchall_0 move-exception v0 monitor-exit v1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v0 .end method .method public getResult()Ljava/lang/Object; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()TTResult;" } .end annotation .prologue .line 155 iget-object v1, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v1 .line 156 :try_start_0 iget-object v0, p0, Lbolts/Task;->result:Ljava/lang/Object; monitor-exit v1 return-object v0 .line 157 :catchall_0 move-exception v0 monitor-exit v1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v0 .end method .method public isCancelled()Z .locals 2 .prologue .line 137 iget-object v1, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v1 .line 138 :try_start_0 iget-boolean v0, p0, Lbolts/Task;->cancelled:Z monitor-exit v1 return v0 .line 139 :catchall_0 move-exception v0 monitor-exit v1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v0 .end method .method public isCompleted()Z .locals 2 .prologue .line 128 iget-object v1, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v1 .line 129 :try_start_0 iget-boolean v0, p0, Lbolts/Task;->complete:Z monitor-exit v1 return v0 .line 130 :catchall_0 move-exception v0 monitor-exit v1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v0 .end method .method public isFaulted()Z .locals 2 .prologue .line 146 iget-object v1, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v1 .line 147 :try_start_0 invoke-virtual {p0}, Lbolts/Task;->getError()Ljava/lang/Exception; move-result-object v0 if-eqz v0, :cond_0 const/4 v0, 0x1 :goto_0 monitor-exit v1 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .line 148 :catchall_0 move-exception v0 monitor-exit v1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v0 .end method .method public makeVoid()Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lbolts/Task", "<", "Ljava/lang/Void;", ">;" } .end annotation .prologue .line 300 new-instance v0, Lbolts/Task$3; invoke-direct {v0, p0}, Lbolts/Task$3;->(Lbolts/Task;)V invoke-virtual {p0, v0}, Lbolts/Task;->continueWithTask(Lbolts/Continuation;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public onSuccess(Lbolts/Continuation;)Lbolts/Task; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";)", "Lbolts/Task", ";" } .end annotation .prologue .line 778 sget-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; const/4 v1, 0x0 invoke-virtual {p0, p1, v0, v1}, Lbolts/Task;->onSuccess(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public onSuccess(Lbolts/Continuation;Lbolts/CancellationToken;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";", "Lbolts/CancellationToken;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 787 sget-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; invoke-virtual {p0, p1, v0, p2}, Lbolts/Task;->onSuccess(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public onSuccess(Lbolts/Continuation;Ljava/util/concurrent/Executor;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";", "Ljava/util/concurrent/Executor;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 744 const/4 v0, 0x0 invoke-virtual {p0, p1, p2, v0}, Lbolts/Task;->onSuccess(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public onSuccess(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";", "Ljava/util/concurrent/Executor;", "Lbolts/CancellationToken;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 754 new-instance v0, Lbolts/Task$12; invoke-direct {v0, p0, p3, p1}, Lbolts/Task$12;->(Lbolts/Task;Lbolts/CancellationToken;Lbolts/Continuation;)V invoke-virtual {p0, v0, p2}, Lbolts/Task;->continueWithTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public onSuccessTask(Lbolts/Continuation;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";>;)", "Lbolts/Task", ";" } .end annotation .prologue .line 830 sget-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; invoke-virtual {p0, p1, v0}, Lbolts/Task;->onSuccessTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public onSuccessTask(Lbolts/Continuation;Lbolts/CancellationToken;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";>;", "Lbolts/CancellationToken;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 840 sget-object v0, Lbolts/Task;->IMMEDIATE_EXECUTOR:Ljava/util/concurrent/Executor; invoke-virtual {p0, p1, v0, p2}, Lbolts/Task;->onSuccessTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public onSuccessTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";>;", "Ljava/util/concurrent/Executor;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 796 const/4 v0, 0x0 invoke-virtual {p0, p1, p2, v0}, Lbolts/Task;->onSuccessTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method public onSuccessTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;Lbolts/CancellationToken;)Lbolts/Task; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lbolts/Continuation", ";>;", "Ljava/util/concurrent/Executor;", "Lbolts/CancellationToken;", ")", "Lbolts/Task", ";" } .end annotation .prologue .line 806 new-instance v0, Lbolts/Task$13; invoke-direct {v0, p0, p3, p1}, Lbolts/Task$13;->(Lbolts/Task;Lbolts/CancellationToken;Lbolts/Continuation;)V invoke-virtual {p0, v0, p2}, Lbolts/Task;->continueWithTask(Lbolts/Continuation;Ljava/util/concurrent/Executor;)Lbolts/Task; move-result-object v0 return-object v0 .end method .method trySetCancelled()Z .locals 3 .prologue const/4 v0, 0x1 .line 971 iget-object v1, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v1 .line 972 :try_start_0 iget-boolean v2, p0, Lbolts/Task;->complete:Z if-eqz v2, :cond_0 .line 973 const/4 v0, 0x0 monitor-exit v1 .line 979 :goto_0 return v0 .line 975 :cond_0 const/4 v2, 0x1 iput-boolean v2, p0, Lbolts/Task;->complete:Z .line 976 const/4 v2, 0x1 iput-boolean v2, p0, Lbolts/Task;->cancelled:Z .line 977 iget-object v2, p0, Lbolts/Task;->lock:Ljava/lang/Object; invoke-virtual {v2}, Ljava/lang/Object;->notifyAll()V .line 978 invoke-direct {p0}, Lbolts/Task;->runContinuations()V .line 979 monitor-exit v1 goto :goto_0 .line 980 :catchall_0 move-exception v0 monitor-exit v1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v0 .end method .method trySetError(Ljava/lang/Exception;)Z .locals 4 .prologue const/4 v1, 0x1 const/4 v0, 0x0 .line 1003 iget-object v2, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v2 .line 1004 :try_start_0 iget-boolean v3, p0, Lbolts/Task;->complete:Z if-eqz v3, :cond_0 .line 1005 monitor-exit v2 .line 1014 :goto_0 return v0 .line 1007 :cond_0 const/4 v0, 0x1 iput-boolean v0, p0, Lbolts/Task;->complete:Z .line 1008 iput-object p1, p0, Lbolts/Task;->error:Ljava/lang/Exception; .line 1009 const/4 v0, 0x0 iput-boolean v0, p0, Lbolts/Task;->errorHasBeenObserved:Z .line 1010 iget-object v0, p0, Lbolts/Task;->lock:Ljava/lang/Object; invoke-virtual {v0}, Ljava/lang/Object;->notifyAll()V .line 1011 invoke-direct {p0}, Lbolts/Task;->runContinuations()V .line 1012 iget-boolean v0, p0, Lbolts/Task;->errorHasBeenObserved:Z if-nez v0, :cond_1 invoke-static {}, Lbolts/Task;->getUnobservedExceptionHandler()Lbolts/Task$UnobservedExceptionHandler; move-result-object v0 if-eqz v0, :cond_1 .line 1013 new-instance v0, Lbolts/UnobservedErrorNotifier; invoke-direct {v0, p0}, Lbolts/UnobservedErrorNotifier;->(Lbolts/Task;)V iput-object v0, p0, Lbolts/Task;->unobservedErrorNotifier:Lbolts/UnobservedErrorNotifier; .line 1014 :cond_1 monitor-exit v2 move v0, v1 goto :goto_0 .line 1015 :catchall_0 move-exception v0 monitor-exit v2 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v0 .end method .method trySetResult(Ljava/lang/Object;)Z .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(TTResult;)Z" } .end annotation .prologue const/4 v0, 0x1 .line 987 iget-object v1, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v1 .line 988 :try_start_0 iget-boolean v2, p0, Lbolts/Task;->complete:Z if-eqz v2, :cond_0 .line 989 const/4 v0, 0x0 monitor-exit v1 .line 995 :goto_0 return v0 .line 991 :cond_0 const/4 v2, 0x1 iput-boolean v2, p0, Lbolts/Task;->complete:Z .line 992 iput-object p1, p0, Lbolts/Task;->result:Ljava/lang/Object; .line 993 iget-object v2, p0, Lbolts/Task;->lock:Ljava/lang/Object; invoke-virtual {v2}, Ljava/lang/Object;->notifyAll()V .line 994 invoke-direct {p0}, Lbolts/Task;->runContinuations()V .line 995 monitor-exit v1 goto :goto_0 .line 996 :catchall_0 move-exception v0 monitor-exit v1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v0 .end method .method public waitForCompletion()V .locals 2 .prologue .line 180 iget-object v1, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v1 .line 181 :try_start_0 invoke-virtual {p0}, Lbolts/Task;->isCompleted()Z move-result v0 if-nez v0, :cond_0 .line 182 iget-object v0, p0, Lbolts/Task;->lock:Ljava/lang/Object; invoke-virtual {v0}, Ljava/lang/Object;->wait()V .line 184 :cond_0 monitor-exit v1 .line 185 return-void .line 184 :catchall_0 move-exception v0 monitor-exit v1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v0 .end method .method public waitForCompletion(JLjava/util/concurrent/TimeUnit;)Z .locals 5 .prologue .line 193 iget-object v1, p0, Lbolts/Task;->lock:Ljava/lang/Object; monitor-enter v1 .line 194 :try_start_0 invoke-virtual {p0}, Lbolts/Task;->isCompleted()Z move-result v0 if-nez v0, :cond_0 .line 195 iget-object v0, p0, Lbolts/Task;->lock:Ljava/lang/Object; invoke-virtual {p3, p1, p2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J move-result-wide v2 invoke-virtual {v0, v2, v3}, Ljava/lang/Object;->wait(J)V .line 197 :cond_0 invoke-virtual {p0}, Lbolts/Task;->isCompleted()Z move-result v0 monitor-exit v1 return v0 .line 198 :catchall_0 move-exception v0 monitor-exit v1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v0 .end method