ThrottlingProducer$ThrottlerConsumer.smali
.class Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer;
.super Lcom/facebook/imagepipeline/producers/DelegatingConsumer;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/facebook/imagepipeline/producers/ThrottlingProducer;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = "ThrottlerConsumer"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/facebook/imagepipeline/producers/DelegatingConsumer<",
"TT;TT;>;"
}
.end annotation
# instance fields
.field public final synthetic this$0:Lcom/facebook/imagepipeline/producers/ThrottlingProducer;
# direct methods
.method private constructor <init>(Lcom/facebook/imagepipeline/producers/ThrottlingProducer;Lcom/facebook/imagepipeline/producers/Consumer;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/facebook/imagepipeline/producers/Consumer<",
"TT;>;)V"
}
.end annotation
.line 2
iput-object p1, p0, Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer;->this$0:Lcom/facebook/imagepipeline/producers/ThrottlingProducer;
.line 3
invoke-direct {p0, p2}, Lcom/facebook/imagepipeline/producers/DelegatingConsumer;-><init>(Lcom/facebook/imagepipeline/producers/Consumer;)V
return-void
.end method
.method public synthetic constructor <init>(Lcom/facebook/imagepipeline/producers/ThrottlingProducer;Lcom/facebook/imagepipeline/producers/Consumer;Lcom/facebook/imagepipeline/producers/ThrottlingProducer$1;)V
.registers 4
.line 1
invoke-direct {p0, p1, p2}, Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer;-><init>(Lcom/facebook/imagepipeline/producers/ThrottlingProducer;Lcom/facebook/imagepipeline/producers/Consumer;)V
return-void
.end method
.method public static INVOKEINTERFACE_com_facebook_imagepipeline_producers_ThrottlingProducer$ThrottlerConsumer_com_shopee_app_asm_anr_threadpool_ExecutorProxy_execute(Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)V
.registers 4
.line 1
invoke-static {}, Lcom/shopee/app/asm/anr/threadpool/c;->b()Z
move-result v0
if-eqz v0, :cond_3a
invoke-static {}, Lcom/shopee/app/asm/anr/threadpool/c;->a()Z
move-result v0
if-eqz v0, :cond_3a
.line 2
:try_start_c
sget-object v0, Lcom/shopee/app/asm/anr/threadpool/c;->a:Landroid/os/HandlerThread;
.line 3
sget-object v0, Lcom/shopee/app/asm/anr/threadpool/c;->b:Landroid/os/Handler;
new-instance v1, Lcom/shopee/app/asm/anr/threadpool/a$b;
invoke-direct {v1, p0, p1}, Lcom/shopee/app/asm/anr/threadpool/a$b;-><init>(Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
:try_end_18
.catchall {:try_start_c .. :try_end_18} :catchall_19
goto :goto_54
:catchall_19
move-exception v0
.line 4
invoke-virtual {v0}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
sget-object v0, Lcom/shopee/app/asm/anr/threadpool/c;->a:Landroid/os/HandlerThread;
.line 5
:try_start_1f
invoke-static {p1, p0}, Lcom/shopee/app/asm/anr/threadpool/a;->a(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2b
.line 6
sget-object p0, Lcom/shopee/app/asm/fix/threadpool/global/i;->e:Lcom/shopee/app/asm/fix/threadpool/global/j;
.line 7
invoke-virtual {p0, p1}, Lcom/shopee/app/asm/anr/threadpool/b;->execute(Ljava/lang/Runnable;)V
return-void
.line 8
:cond_2b
invoke-interface {p0, p1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_2e
.catchall {:try_start_1f .. :try_end_2e} :catchall_2f
goto :goto_54
:catchall_2f
move-exception p0
.line 9
sget-object p1, Lcom/shopee/app/asm/anr/threadpool/c;->a:Landroid/os/HandlerThread;
.line 10
invoke-static {}, Lcom/shopee/app/apm/c;->d()Lcom/shopee/app/apm/nonfatal/a;
move-result-object p1
invoke-virtual {p1, p0}, Lcom/shopee/app/apm/nonfatal/a;->c(Ljava/lang/Throwable;)V
goto :goto_54
.line 11
:cond_3a
:try_start_3a
invoke-static {p1, p0}, Lcom/shopee/app/asm/anr/threadpool/a;->a(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_46
.line 12
sget-object p0, Lcom/shopee/app/asm/fix/threadpool/global/i;->e:Lcom/shopee/app/asm/fix/threadpool/global/j;
.line 13
invoke-virtual {p0, p1}, Lcom/shopee/app/asm/anr/threadpool/b;->execute(Ljava/lang/Runnable;)V
return-void
.line 14
:cond_46
invoke-interface {p0, p1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_49
.catchall {:try_start_3a .. :try_end_49} :catchall_4a
goto :goto_54
:catchall_4a
move-exception p0
.line 15
sget-object p1, Lcom/shopee/app/asm/anr/threadpool/c;->a:Landroid/os/HandlerThread;
.line 16
invoke-static {}, Lcom/shopee/app/apm/c;->d()Lcom/shopee/app/apm/nonfatal/a;
move-result-object p1
invoke-virtual {p1, p0}, Lcom/shopee/app/apm/nonfatal/a;->c(Ljava/lang/Throwable;)V
:goto_54
return-void
.end method
.method private onRequestFinished()V
.registers 4
.line 1
iget-object v0, p0, Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer;->this$0:Lcom/facebook/imagepipeline/producers/ThrottlingProducer;
monitor-enter v0
.line 2
:try_start_3
iget-object v1, p0, Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer;->this$0:Lcom/facebook/imagepipeline/producers/ThrottlingProducer;
# getter for: Lcom/facebook/imagepipeline/producers/ThrottlingProducer;->mPendingRequests:Ljava/util/concurrent/ConcurrentLinkedQueue;
invoke-static {v1}, Lcom/facebook/imagepipeline/producers/ThrottlingProducer;->access$100(Lcom/facebook/imagepipeline/producers/ThrottlingProducer;)Ljava/util/concurrent/ConcurrentLinkedQueue;
move-result-object v1
invoke-virtual {v1}, Ljava/util/concurrent/ConcurrentLinkedQueue;->poll()Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/util/Pair;
if-nez v1, :cond_16
.line 3
iget-object v2, p0, Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer;->this$0:Lcom/facebook/imagepipeline/producers/ThrottlingProducer;
# operator-- for: Lcom/facebook/imagepipeline/producers/ThrottlingProducer;->mNumCurrentRequests:I
invoke-static {v2}, Lcom/facebook/imagepipeline/producers/ThrottlingProducer;->access$210(Lcom/facebook/imagepipeline/producers/ThrottlingProducer;)I
.line 4
:cond_16
monitor-exit v0
:try_end_17
.catchall {:try_start_3 .. :try_end_17} :catchall_28
if-eqz v1, :cond_27
.line 5
iget-object v0, p0, Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer;->this$0:Lcom/facebook/imagepipeline/producers/ThrottlingProducer;
# getter for: Lcom/facebook/imagepipeline/producers/ThrottlingProducer;->mExecutor:Ljava/util/concurrent/Executor;
invoke-static {v0}, Lcom/facebook/imagepipeline/producers/ThrottlingProducer;->access$300(Lcom/facebook/imagepipeline/producers/ThrottlingProducer;)Ljava/util/concurrent/Executor;
move-result-object v0
new-instance v2, Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer$1;
invoke-direct {v2, p0, v1}, Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer$1;-><init>(Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer;Landroid/util/Pair;)V
invoke-static {v0, v2}, Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer;->INVOKEINTERFACE_com_facebook_imagepipeline_producers_ThrottlingProducer$ThrottlerConsumer_com_shopee_app_asm_anr_threadpool_ExecutorProxy_execute(Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)V
:cond_27
return-void
:catchall_28
move-exception v1
.line 6
:try_start_29
monitor-exit v0
:try_end_2a
.catchall {:try_start_29 .. :try_end_2a} :catchall_28
throw v1
.end method
# virtual methods
.method public onCancellationImpl()V
.registers 2
.line 1
invoke-virtual {p0}, Lcom/facebook/imagepipeline/producers/DelegatingConsumer;->getConsumer()Lcom/facebook/imagepipeline/producers/Consumer;
move-result-object v0
invoke-interface {v0}, Lcom/facebook/imagepipeline/producers/Consumer;->onCancellation()V
.line 2
invoke-direct {p0}, Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer;->onRequestFinished()V
return-void
.end method
.method public onFailureImpl(Ljava/lang/Throwable;)V
.registers 3
.line 1
invoke-virtual {p0}, Lcom/facebook/imagepipeline/producers/DelegatingConsumer;->getConsumer()Lcom/facebook/imagepipeline/producers/Consumer;
move-result-object v0
invoke-interface {v0, p1}, Lcom/facebook/imagepipeline/producers/Consumer;->onFailure(Ljava/lang/Throwable;)V
.line 2
invoke-direct {p0}, Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer;->onRequestFinished()V
return-void
.end method
.method public onNewResultImpl(Ljava/lang/Object;I)V
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;I)V"
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/facebook/imagepipeline/producers/DelegatingConsumer;->getConsumer()Lcom/facebook/imagepipeline/producers/Consumer;
move-result-object v0
invoke-interface {v0, p1, p2}, Lcom/facebook/imagepipeline/producers/Consumer;->onNewResult(Ljava/lang/Object;I)V
.line 2
invoke-static {p2}, Lcom/facebook/imagepipeline/producers/BaseConsumer;->isLast(I)Z
move-result p1
if-eqz p1, :cond_10
.line 3
invoke-direct {p0}, Lcom/facebook/imagepipeline/producers/ThrottlingProducer$ThrottlerConsumer;->onRequestFinished()V
:cond_10
return-void
.end method